From 4fbf4aa128c5f5fee62d520dea9d3dfd10f33cdb Mon Sep 17 00:00:00 2001 From: "Kevin H. Luu" Date: Mon, 29 Jul 2024 17:03:45 -0700 Subject: [PATCH] [ci] GHA workflow to remove ready label upon "/notready" comment (#6921) Signed-off-by: kevin --- .../remove_label_not_ready_comment.yml | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/remove_label_not_ready_comment.yml diff --git a/.github/workflows/remove_label_not_ready_comment.yml b/.github/workflows/remove_label_not_ready_comment.yml new file mode 100644 index 000000000000..d1da7726eaee --- /dev/null +++ b/.github/workflows/remove_label_not_ready_comment.yml @@ -0,0 +1,23 @@ +name: Remove ready Label on notready Comment + +on: + issue_comment: + types: [created] + +jobs: + add-ready-label: + runs-on: ubuntu-latest + if: github.event.issue.pull_request && contains(github.event.comment.body, '/notready') + steps: + - name: Remove ready label + uses: actions/github-script@v5 + with: + script: | + github.rest.issues.removeLabel({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + name: 'ready' + }) + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}