ci: add 'has: port to stable' label for backports (#1367)

Link: https://github.com/nix-community/stylix/pull/1367

Reviewed-by: NAHO <90870942+trueNAHO@users.noreply.github.com>
This commit is contained in:
awwpotato 2025-06-04 08:36:45 -07:00 committed by GitHub
parent 7e9cced782
commit c0398ebaa4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -7,7 +7,9 @@ on:
pull_request_target:
types: [closed, labeled]
permissions: {}
permissions:
contents: read
pull-requests: write
jobs:
backport:
@ -45,3 +47,17 @@ jobs:
label_pattern: "^backport: ([^ ]+)$"
pull_title: "[${target_branch}] ${pull_title}"
pull_description: "This is an automated backport of #${pull_number}."
- name: "Add 'has: port to stable' label"
if: steps.backport.outputs.created_pull_numbers != ''
env:
# Not the app on purpose to avoid triggering another workflow run
# after adding this label
GH_TOKEN: ${{ github.token }}
REPOSITORY: ${{ github.repository }}
NUMBER: ${{ github.event.number }}
run: |
gh api \
--method POST \
/repos/"$REPOSITORY"/issues/"$NUMBER"/labels \
-f "labels[]=has: port to stable"