@@ -4,52 +4,11 @@ All notable changes to this project will be documented in this file.
44The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
55and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
66
7- ## [ v2.1 .0] - 2026-05-05
7+ ## [ v2.0 .0] - 2026-05-05
88
9- ### Added
10- - Gitea self-hosted support. The action auto-detects Gitea Actions (via
11- the ` GITEA_ACTIONS=true ` env var the runner sets, or a ` /api/v1 ` suffix
12- on ` GITHUB_API_URL ` ) and routes API calls through a Gitea-aware client
13- that handles the three places Gitea diverges from GitHub: ` POST ` (not
14- ` PUT ` ) on ` /pulls/{n}/merge ` with the CamelCase
15- ` Do ` /` MergeTitleField ` /` MergeMessageField ` /` head_commit_id ` body, label
16- removal by numeric id (with a name→id lookup), and an empty-body merge
17- response. No new runtime dependency. The existing GitHub path is
18- unchanged.
19- - README section documenting Gitea-compatible workflow gates — using
20- ` contains(github.event.pull_request.labels.*.name, '...') ` instead of
21- ` github.event.label.name ` , which Gitea does not populate.
22-
23- ### Fixed
24- - ` remove_label ` now percent-encodes the full label name. The previous
25- encoder only handled ` % ` , space, and ` / ` , so labels containing ` ? ` ,
26- ` # ` , ` & ` , ` + ` , ` = ` , ` : ` , or any non-ASCII byte (e.g. ` café ` , emoji)
27- produced malformed URLs that GitHub would reject. Replaced with an
28- RFC 3986 path-segment encoder that keeps the unreserved set and
29- percent-encodes every other byte.
30- - ` Cargo.toml ` 's ` license ` field said ` MIT ` while the actual ` LICENSE `
31- file in the repository (and the rest of the ` sudo-bot ` actions
32- family) is the Mozilla Public License 2.0. Corrected the metadata
33- to match: ` license = "MPL-2.0" ` . No code change.
34-
35- ### Changed
36- - ` OctocrabClient::get_pull ` now deserialises responses straight into the
37- action's minimal ` PullRequest ` projection instead of going through
38- octocrab's typed ` pulls().get() ` API and serde-cycling the result.
39- Same wire request, more resilient to forks that omit optional GitHub
40- fields.
41- - ` octocrab ` upgraded ` 0.49 ` → ` 0.50 ` .
42-
43- ### Internal
44- - Test count grew from 19 to 74. New coverage: ` wiremock ` integration
45- tests pin HTTP method, URL, headers and body for every endpoint on
46- both clients; the ` is_gitea ` detection rule extracted to a unit-tested
47- ` pick_backend() ` ; ` StdoutLogger ` byte-level verification via a
48- ` WriteLogger<W: Write> ` parameterisation; error-propagation paths,
49- multi-label match semantics, and Gitea label-id resolution edge cases
50- all now have direct tests.
51-
52- ## [ v2.0.0] - 2026-04-20
9+ The ` v2 ` marketplace tag is moving — this entry covers everything in it
10+ as of today, from the original Rust rewrite (initially released
11+ 2026-04-20) through the Gitea support added 2026-05-05.
5312
5413### Changed
5514- ** Action rewritten in Rust.** The action is now a single Rust binary
@@ -68,8 +27,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6827 bumped to current versions.
6928- README rewritten with an inputs table, required permissions block,
7029 and worked examples for each merge method.
30+ - ` OctocrabClient::get_pull ` deserialises responses straight into the
31+ action's minimal ` PullRequest ` projection instead of going through
32+ octocrab's typed ` pulls().get() ` API and serde-cycling the result.
33+ Same wire request, more resilient to forks that omit optional GitHub
34+ fields.
35+ - ` octocrab ` upgraded ` 0.49 ` → ` 0.50 ` .
7136
7237### Added
38+ - Gitea self-hosted support. The action auto-detects Gitea Actions (via
39+ the ` GITEA_ACTIONS=true ` env var the runner sets, or a ` /api/v1 ` suffix
40+ on ` GITHUB_API_URL ` ) and routes API calls through a Gitea-aware client
41+ that handles the three places Gitea diverges from GitHub: ` POST ` (not
42+ ` PUT ` ) on ` /pulls/{n}/merge ` with the CamelCase
43+ ` Do ` /` MergeTitleField ` /` MergeMessageField ` /` head_commit_id ` body, label
44+ removal by numeric id (with a name→id lookup), and an empty-body merge
45+ response. No new runtime dependency. The existing GitHub path is
46+ unchanged.
47+ - README section documenting Gitea-compatible workflow gates — using
48+ ` contains(github.event.pull_request.labels.*.name, '...') ` instead of
49+ ` github.event.label.name ` , which Gitea does not populate.
7350- ` fast-forward ` merge method. Calls
7451 ` PATCH /repos/{o}/{r}/git/refs/heads/{base} ` to advance the base
7552 branch to the PR's head SHA — a true fast-forward with no merge
@@ -81,9 +58,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8158 is removed, not the regex pattern.
8259
8360### Fixed
61+ - ` remove_label ` now percent-encodes the full label name. The previous
62+ encoder only handled ` % ` , space, and ` / ` , so labels containing ` ? ` ,
63+ ` # ` , ` & ` , ` + ` , ` = ` , ` : ` , or any non-ASCII byte (e.g. ` café ` , emoji)
64+ produced malformed URLs that GitHub would reject. Replaced with an
65+ RFC 3986 path-segment encoder that keeps the unreserved set and
66+ percent-encodes every other byte.
8467- Label removal correctly removes the matched label even when
8568 ` filter-label ` is a regex (previously the regex string was sent to
8669 the delete endpoint).
70+ - ` Cargo.toml ` 's ` license ` field said ` MIT ` while the actual ` LICENSE `
71+ file in the repository (and the rest of the ` sudo-bot ` actions
72+ family) is the Mozilla Public License 2.0. Corrected the metadata
73+ to match: ` license = "MPL-2.0" ` .
74+
75+ ### Internal
76+ - Test count grew from 19 to 74. New coverage: ` wiremock ` integration
77+ tests pin HTTP method, URL, headers and body for every endpoint on
78+ both clients; the ` is_gitea ` detection rule extracted to a unit-tested
79+ ` pick_backend() ` ; ` StdoutLogger ` byte-level verification via a
80+ ` WriteLogger<W: Write> ` parameterisation; error-propagation paths,
81+ multi-label match semantics, and Gitea label-id resolution edge cases
82+ all now have direct tests.
8783
8884## [ v1.2.0] - 2022-07-10
8985
@@ -122,7 +118,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
122118
123119- First stable version
124120
125- [ v2.1 .0 ] : https://github.com/sudo-bot/action-pull-request-merge/compare/v1.2.0...v2
121+ [ v2.0 .0 ] : https://github.com/sudo-bot/action-pull-request-merge/compare/v1.2.0...v2
126122[ v1.2.0 ] : https://github.com/sudo-bot/action-pull-request-merge/compare/v1.1.1...v1.2.0
127123[ v1.1.1 ] : https://github.com/sudo-bot/action-pull-request-merge/compare/v1.1.0...v1.1.1
128124[ v1.1.0 ] : https://github.com/sudo-bot/action-pull-request-merge/compare/v1.0.3...v1.1.0
0 commit comments