From eedb34cd7ac37a13ee0e4e3d6c81a09f210ffd32 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Tue, 27 Apr 2021 17:47:30 -0700 Subject: [PATCH 1/2] meta: post comment when pr labeled fast-track Signed-off-by: James M Snell --- .github/workflows/comment-stalled.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/comment-stalled.yml b/.github/workflows/comment-stalled.yml index 1c21505c4ad317..14e48ea8dd37ca 100644 --- a/.github/workflows/comment-stalled.yml +++ b/.github/workflows/comment-stalled.yml @@ -1,4 +1,4 @@ -name: Comment on issues and PRs when labelled stalled +name: Comment on issues and PRs when labelled on: issues: types: [labeled] @@ -7,11 +7,10 @@ on: jobs: staleComment: - if: github.repository == 'nodejs/node' + if: github.repository == 'nodejs/node' && github.event.label.name == 'stalled' runs-on: ubuntu-latest steps: - - name: Post comment - if: github.event.label.name == 'stalled' + - name: Post stalled comment env: COMMENTS_URL: ${{ github.event.issue.comments_url || github.event.pull_request.comments_url }} run: | @@ -19,3 +18,12 @@ jobs: -H "Content-Type: application/json" \ -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ --data '{ "body": "This issue/PR was marked as stalled, it will be automatically closed in 30 days. If it should remain open, please leave a comment explaining why it should remain open." }' + + fastTrack: + if: github.repository == 'nodejs/node' && github.event_name == 'pull_request_target' && github.event.label.name == 'fast-track' + runs-on: ubuntu-latest + steps: + - name: Request Fast-Track + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: gh pr comment ${{ github.event.pull_request.number }} --repo ${{ github.repository }} --body "Fast-track has been requested by @${{ github.actor }}. Please 👍 to approve." From 2e57e178462c5d56b33d3a5ab6f54e076cc5c5a5 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Wed, 28 Apr 2021 11:54:44 -0700 Subject: [PATCH 2/2] fixup! meta: post comment when pr labeled fast-track --- .github/workflows/{comment-stalled.yml => comment-labeled.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{comment-stalled.yml => comment-labeled.yml} (100%) diff --git a/.github/workflows/comment-stalled.yml b/.github/workflows/comment-labeled.yml similarity index 100% rename from .github/workflows/comment-stalled.yml rename to .github/workflows/comment-labeled.yml