Skip to content

Commit eedb34c

Browse files
committed
meta: post comment when pr labeled fast-track
Signed-off-by: James M Snell <jasnell@gmail.com>
1 parent 3240435 commit eedb34c

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

.github/workflows/comment-stalled.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Comment on issues and PRs when labelled stalled
1+
name: Comment on issues and PRs when labelled
22
on:
33
issues:
44
types: [labeled]
@@ -7,15 +7,23 @@ on:
77

88
jobs:
99
staleComment:
10-
if: github.repository == 'nodejs/node'
10+
if: github.repository == 'nodejs/node' && github.event.label.name == 'stalled'
1111
runs-on: ubuntu-latest
1212
steps:
13-
- name: Post comment
14-
if: github.event.label.name == 'stalled'
13+
- name: Post stalled comment
1514
env:
1615
COMMENTS_URL: ${{ github.event.issue.comments_url || github.event.pull_request.comments_url }}
1716
run: |
1817
curl -X POST $COMMENTS_URL \
1918
-H "Content-Type: application/json" \
2019
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
2120
--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." }'
21+
22+
fastTrack:
23+
if: github.repository == 'nodejs/node' && github.event_name == 'pull_request_target' && github.event.label.name == 'fast-track'
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Request Fast-Track
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
run: gh pr comment ${{ github.event.pull_request.number }} --repo ${{ github.repository }} --body "Fast-track has been requested by @${{ github.actor }}. Please 👍 to approve."

0 commit comments

Comments
 (0)