From c04b0f570e2057e010019aa81958b303abfaff5c Mon Sep 17 00:00:00 2001 From: James M Snell Date: Tue, 27 Apr 2021 17:47:30 -0700 Subject: [PATCH] meta: post comment when pr labeled fast-track Signed-off-by: James M Snell --- .github/workflows/fast-track.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/fast-track.yml diff --git a/.github/workflows/fast-track.yml b/.github/workflows/fast-track.yml new file mode 100644 index 000000000000000..8485b400f638b50 --- /dev/null +++ b/.github/workflows/fast-track.yml @@ -0,0 +1,19 @@ +name: Request PR Fast-track +on: + pull_request_target: + types: [labeled] + +jobs: + fastTrack: + if: github.repository == 'nodejs/node' + runs-on: ubuntu-latest + steps: + - name: Request Fast-Track + if: github.event.label.name == 'fast-track' + env: + COMMENTS_URL: ${{ github.event.issue.comments_url || github.event.pull_request.comments_url }} + run: | + curl -X POST $COMMENTS_URL \ + -H "Content-Type: application/json" \ + -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ + --data '{ "body": "Fast-track has been requested. Please 👍 to approve." }'