Skip to content

Commit 10f4cdc

Browse files
bkonturEgorPopelyaev
authored andcommitted
Allow create backport branches to unstable by A4-backport-unstable* tag (#9167)
In this [PR](#9139 (comment)), I added the `A4-backport-unstable2507` label, but no backport branch was created for `unstable2507`. Was this intentional or just an oversight or did I miss anything in the release channel? How do we do backports to unstable2507? If manually, just close this. cc: @EgorPopelyaev - this PR is just a blind draft (not sure if it works), probably more needs to be fixed and properly tested. If we really need this, could you please take it over the finish line? If not, just close it :) Co-authored-by: Egor_P <[email protected]>
1 parent 8a8d7fd commit 10f4cdc

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

.github/scripts/common/lib.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ parse_branch_names_from_backport_labels() {
530530
BRANCHES=""
531531

532532
for label in $labels; do
533-
if [[ "$label" =~ ^A4-backport-stable[0-9]{4}$ ]]; then
533+
if [[ "$label" =~ ^A4-backport-(stable|unstable)[0-9]{4}$ ]]; then
534534
branch_name=$(sed 's/A4-backport-//' <<< "$label")
535535
BRANCHES+=" ${branch_name}"
536536
fi

.github/workflows/check-semver.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ jobs:
130130
fi
131131
132132
# Only enforce SemVer restrictions for backports targeting stable branches
133-
if [[ "$BASE_BRANCH" != stable* ]]; then
134-
echo "ℹ️ Branch '$BASE_BRANCH' is not a stable branch. Skipping SemVer backport-specific enforcements."
133+
if [[ "$BASE_BRANCH" != stable* && "$BASE_BRANCH" != unstable* ]]; then
134+
echo "ℹ️ Branch '$BASE_BRANCH' is not a (un)stable branch. Skipping SemVer backport-specific enforcements."
135135
exit 0
136136
fi
137137

.github/workflows/command-backport.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
run: |
3838
LABELS=$(gh pr view ${{ github.event.pull_request.number }} --json labels --jq '.labels[].name')
3939
40-
if echo "$LABELS" | grep -q '^A4-backport-stable'; then
40+
if echo "$LABELS" | grep -qE '^A4-backport-(stable|unstable)'; then
4141
echo "found=true" >> $GITHUB_OUTPUT
4242
readarray -t labels_array <<< "$LABELS"
4343
echo "LABELS=${labels_array[@]}" >> $GITHUB_OUTPUT
@@ -97,7 +97,7 @@ jobs:
9797
"conflict_resolution": "draft_commit_conflicts"
9898
}
9999
copy_assignees: true
100-
label_pattern: ^A4-backport-stable
100+
label_pattern: ^A4-backport-(stable|unstable)
101101

102102
- name: Label Backports
103103
if: ${{ steps.backport.outputs.created_pull_numbers != '' }}

0 commit comments

Comments
 (0)