Skip to content

Commit 96f54d3

Browse files
jasnelltargos
authored andcommitted
meta: post comment when pr labeled fast-track
Signed-off-by: James M Snell <[email protected]> PR-URL: #38446 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Anto Aravinth <[email protected]> Reviewed-By: Mary Marchini <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
1 parent 7b9fb92 commit 96f54d3

File tree

2 files changed

+29
-21
lines changed

2 files changed

+29
-21
lines changed

.github/workflows/comment-labeled.yml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Comment on issues and PRs when labelled
2+
on:
3+
issues:
4+
types: [labeled]
5+
pull_request_target:
6+
types: [labeled]
7+
8+
jobs:
9+
staleComment:
10+
if: github.repository == 'nodejs/node' && github.event.label.name == 'stalled'
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Post stalled comment
14+
env:
15+
COMMENTS_URL: ${{ github.event.issue.comments_url || github.event.pull_request.comments_url }}
16+
run: |
17+
curl -X POST $COMMENTS_URL \
18+
-H "Content-Type: application/json" \
19+
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
20+
--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."

.github/workflows/comment-stalled.yml

-21
This file was deleted.

0 commit comments

Comments
 (0)