mirror of
https://github.com/NixOS/rfcs.git
synced 2025-11-09 20:16:12 +01:00
ci: update labels on merged PRs
This commit is contained in:
parent
f557e0736e
commit
cf925c9e3c
1 changed files with 29 additions and 0 deletions
29
.github/workflows/update-pr-labels.yml
vendored
Normal file
29
.github/workflows/update-pr-labels.yml
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
name: Update PR labels
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [closed]
|
||||
|
||||
jobs:
|
||||
after-merge:
|
||||
if: github.event.pull_request.merged == true
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
pull-requests: write
|
||||
|
||||
steps:
|
||||
- uses: cachix/install-nix-action@v30
|
||||
|
||||
- run: nix-env -iA nixpkgs.github-cli
|
||||
|
||||
- name: Update PR Labels
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||
REPO: ${{ github.repository }}
|
||||
run: |
|
||||
# Remove `status: accepted` label, if present
|
||||
gh pr edit $PR_NUMBER --remove-label "status: accepted" --repo $REPO || true
|
||||
|
||||
# Add `status: merged` label
|
||||
gh pr edit $PR_NUMBER --add-label "status: merged" --repo $REPO
|
||||
Loading…
Add table
Add a link
Reference in a new issue