From 9e770ab16ab573c9814b37801f4e04bcca4d389c Mon Sep 17 00:00:00 2001 From: Lorenzo Manacorda Date: Sat, 2 Nov 2024 15:17:12 +0100 Subject: [PATCH] fix --- .github/workflows/update-pr-labels.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/update-pr-labels.yml b/.github/workflows/update-pr-labels.yml index 4321820..55f3fb6 100644 --- a/.github/workflows/update-pr-labels.yml +++ b/.github/workflows/update-pr-labels.yml @@ -6,7 +6,8 @@ on: jobs: after-merge: - if: github.event.pull_request.merged == true + if: | + github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'status: FCP') runs-on: ubuntu-latest permissions: pull-requests: write @@ -15,11 +16,7 @@ jobs: - name: Update labels on accepted RFCs env: GH_TOKEN: ${{ github.token }} + GH_REPO: ${{ github.repository }} PR_NUMBER: ${{ github.event.pull_request.number }} - REPO: ${{ github.repository }} run: | - # Only operate on PR if it has the `status: accepted` label - if gh pr view $PR_NUMBER --repo $REPO --json labels -q 'any(.[].name == "status: accepted")'; then - gh pr edit $PR_NUMBER --remove-label "status: accepted" --repo $REPO - gh pr edit $PR_NUMBER --add-label "status: merged" --repo $REPO - fi + gh pr edit $PR_NUMBER --remove-label "status: FCP" --add-label "status: accepted"