chore(ci): namespace the backport labels under kind/

The labels.yml header declares that names follow the Kubernetes scheme,
but backport and backport-previous were top-level, violating it. Rename
them to kind/backport and kind/backport-previous, grouped under the kind/
section, and carry the old names as aliases so EndBug/label-sync renames
in place without dropping history on already-tagged issues and PRs.

Update the label literals in backport.yaml in lockstep (the if filter and
the label-detection script). pr-labeler.yaml's 'backport' entry is a
Conventional-Commit scope-to-area mapping, not a label reference, so it is
left unchanged. The top-level release label is a functional trigger keyed
by name in several workflows; renaming it is a wider cross-workflow change
out of scope here, so it is left as-is intentionally.

Signed-off-by: IvanHunters <xorokhotnikov@gmail.com>
This commit is contained in:
IvanHunters authored and Myasnikov Daniil committed 2026-08-27 13:08:15 +05:00
1 parent 02c6942adc
commit 7b71053a0b
2 files changed
+20 -12

No files matched your search

+12 -8
View File
@@ -78,6 +78,18 @@
color: 'e11d21'
description: Indicates the change introduces a breaking API or behaviour change
# kind/backport-previous has no upstream Kubernetes equivalent (k8s has no
# two-release-line model); it stays under kind/ per the file convention.
- name: kind/backport
color: 'fbca04'
description: Categorizes issue or PR as requiring a backport to the current release line
aliases: ['backport']
- name: kind/backport-previous
color: 'fbd876'
description: Categorizes issue or PR as requiring a backport to the previous release line
aliases: ['backport-previous']
# ──────────────────────────────────────────────
# priority/ — urgency
# ──────────────────────────────────────────────
@@ -282,14 +294,6 @@
color: 'aaaaaa'
description: Requires resolving an issue in an upstream project
- name: backport
color: 'fbca04'
description: Should change be backported on previous release
- name: backport-previous
color: 'fbd876'
description: Backport target — previous release line
- name: release
color: 'aaaaaa'
description: Releasing a new Cozystack version
+8 -4
View File
@@ -95,8 +95,8 @@ jobs:
github.event.pull_request.merged == true &&
github.event.pull_request.base.ref == 'main' &&
(
(github.event.action == 'closed' && (contains(github.event.pull_request.labels.*.name, 'backport') || contains(github.event.pull_request.labels.*.name, 'backport-previous'))) ||
(github.event.action == 'labeled' && (github.event.label.name == 'backport' || github.event.label.name == 'backport-previous'))
(github.event.action == 'closed' && (contains(github.event.pull_request.labels.*.name, 'backport') || contains(github.event.pull_request.labels.*.name, 'backport-previous') || contains(github.event.pull_request.labels.*.name, 'kind/backport') || contains(github.event.pull_request.labels.*.name, 'kind/backport-previous'))) ||
(github.event.action == 'labeled' && (github.event.label.name == 'backport' || github.event.label.name == 'backport-previous' || github.event.label.name == 'kind/backport' || github.event.label.name == 'kind/backport-previous'))
)
# GitHub API calls only — no docker, no repo toolchain: GitHub-hosted.
runs-on: ubuntu-latest
@@ -144,8 +144,12 @@ jobs:
script: |
const pr = context.payload.pull_request;
const labels = pr.labels.map(l => l.name);
const isBackport = labels.includes('backport');
const isBackportPrevious = labels.includes('backport-previous');
// Both spellings are accepted on purpose. The namespaced names are
// the convention this repo declares, but the org-level dosubot still
// applies the legacy ones and it is the dominant applier on real
// backports, so dropping them would silently stop the bot for those.
const isBackport = labels.includes('kind/backport') || labels.includes('backport');
const isBackportPrevious = labels.includes('kind/backport-previous') || labels.includes('backport-previous');
core.setOutput('backport', isBackport ? 'true' : 'false');
core.setOutput('backport_previous', isBackportPrevious ? 'true' : 'false');