You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 338a4c6
Browse filesBrowse the repository at this point in the historyBrowse files
chore(ci): namespace the backport labels without breaking the trigger (#3844)
Takes over #3433 and finishes it. Closes#2585.
The rename itself is IvanHunters' work, replayed here on current main
with his commits intact. What was blocking it was my own review, and
this fixes that plus one thing that appeared on main afterwards.
## What was blocking it
The gate in `backport.yaml` matched `kind/backport` only after the
rename. The `aliases:` in `labels.yml` migrate labels already attached
to issues and pull requests, but they do not change what an external
applier does going forward, and the org-level dosubot still applies the
legacy names. So the bot would have quietly stopped firing for the share
of backports it labels.
Both spellings are now accepted, in the `if:` gate and in the JS step
that reads them.
## What appeared afterwards
#3569 landed while #3433 sat, and it added a concurrency guard that
appends `-label` to the group for any labeled event that is not a
backport label, so a backport label never cancels a run already in
flight. That guard enumerated the two legacy names, so once the labels
are namespaced a `kind/backport` event takes the `-label` branch and the
guard stops covering the case it exists for. Extended to the new names.
## The dual acceptance is transitional and says so
Accepting two spellings is a bridge, not a design. The plan is to switch
dosubot's pull request labelling off and leave the in-repo labeler as
the only applier, at which point the legacy arms can go. The comment in
the workflow names all three deletion sites so that cleanup is
mechanical: the `if:` gate, the JS step, and the concurrency group.
Landing this before or after dosubot is switched off both work, which is
the point.
## Checks
`actionlint` clean on the workflow. There is no bats coverage for this
gate on main; #3813 is what adds `hack/pr-labeler-contract.bats`, so the
two are worth landing in that order.
### Release note
```release-note
NONE
```
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Workflow Improvements**
- Backport automation now supports standardized `kind/backport` and
`kind/backport-previous` labels while maintaining compatibility with
legacy labels during the transition.
- Stale pull request handling and backport detection now follow the
standardized labeling scheme.
- **Documentation**
- Updated contribution and release documentation with the new labels,
labeling requirements, and troubleshooting guidance.
- **Tests**
- Expanded validation to cover both standardized and legacy backport
labels.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Copy file name to clipboardExpand all lines: docs/release.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -345,8 +345,8 @@ The matching Talos node image is `ghcr.io/cozystack/cozystack/cozystack-nocloud:
345
345
346
346
| Label | Target branch |
347
347
|-------|---------------|
348
-
|`backport`| the newest existing `release-X.Y` branch |
349
-
|`backport-previous`| the second-newest existing `release-X.Y` branch |
348
+
|`kind/backport`| the newest existing `release-X.Y` branch |
349
+
|`kind/backport-previous`| the second-newest existing `release-X.Y` branch |
350
350
351
351
Resolution is dynamic at run time, and it reads the branches themselves: the job lists the repository's branches, keeps the ones matching `release-<major>.<minor>`, and sorts them numerically descending — so `release-1.10` ranks above `release-1.9`, which a lexicographic sort gets backwards. `backport` takes the first, `backport-previous` the second, so both name a branch that exists by construction; asking for `backport-previous` when only one line exists fails the job rather than inventing a target. Nothing is derived arithmetically — an earlier version computed the previous line as `Y-1`, which named a non-existent branch whenever a minor was skipped.
352
352
@@ -376,7 +376,7 @@ git push origin release-X.Y # or push to a new branch and open a PR
376
376
To find the bot's failed comments across a batch of PRs:
377
377
378
378
```bash
379
-
fornin$(gh pr list --search "label:backport label:backport-previous merged:>=2026-01-01" --json number --jq '.[].number');do
379
+
fornin$(gh pr list --search "label:kind/backport label:kind/backport-previous merged:>=2026-01-01" --json number --jq '.[].number');do
380
380
echo"=== #$n ==="
381
381
gh pr view $n --json comments --jq '.comments[] | select(.author.login == "github-actions" or (.author.login | contains("backport"))) | .body'| head -20
382
382
done
@@ -388,8 +388,8 @@ A patch release includes bugfixes for code that shipped in the corresponding min
388
388
389
389
```bash
390
390
# 1. Inventory PRs already labeled for backport (merged but not yet on release-X.Y)
391
-
gh pr list --search "is:merged label:backport" --limit 100
392
-
gh pr list --search "is:merged label:backport-previous" --limit 100
391
+
gh pr list --search "is:merged label:kind/backport" --limit 100
392
+
gh pr list --search "is:merged label:kind/backport-previous" --limit 100
393
393
394
394
# 2. List commits on main since the release branch diverged that are NOT yet on release-X.Y
0 commit comments