From 7f0a0ff91cebfd497c88f2e5634562eb7c2f3be8 Mon Sep 17 00:00:00 2001 From: sahejkm Date: Thu, 16 May 2024 09:41:09 +0800 Subject: [PATCH] Add labels automatically on approve --- .github/workflows/add-label-on-approve.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/add-label-on-approve.yml diff --git a/.github/workflows/add-label-on-approve.yml b/.github/workflows/add-label-on-approve.yml new file mode 100644 index 00000000000..bf2641e99f8 --- /dev/null +++ b/.github/workflows/add-label-on-approve.yml @@ -0,0 +1,22 @@ +name: Add Label to run extended tests on approve + +on: + pull_request_review: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + label_issues: + if: github.event.review.state == 'approved' + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - run: gh pr edit "$NUMBER" --add-label "$LABELS" + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GH_REPO: ${{ github.repository }} + NUMBER: ${{ github.event.pull_request.number }} + LABELS: extended-tests