diff --git a/.github/workflows/comment-stalled.yml b/.github/workflows/comment-stalled.yml index 1c21505c4ad3175..7db93f87274bc9a 100644 --- a/.github/workflows/comment-stalled.yml +++ b/.github/workflows/comment-stalled.yml @@ -10,7 +10,7 @@ jobs: if: github.repository == 'nodejs/node' runs-on: ubuntu-latest steps: - - name: Post comment + - name: Post stalled comment if: github.event.label.name == 'stalled' env: COMMENTS_URL: ${{ github.event.issue.comments_url || github.event.pull_request.comments_url }} @@ -19,3 +19,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. Please 👍 to approve." diff --git a/.github/workflows/fast-track.yml b/.github/workflows/fast-track.yml new file mode 100644 index 000000000000000..5c1a18937f79a1c --- /dev/null +++ b/.github/workflows/fast-track.yml @@ -0,0 +1,15 @@ +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: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: gh pr comment ${{ github.event.pull_request.number }} --repo ${{ github.repository }} --body "Fast-track has been requested. Please 👍 to approve."