Skip to content

Commit

Permalink
meta: post comment when pr labeled fast-track
Browse files Browse the repository at this point in the history
Signed-off-by: James M Snell <jasnell@gmail.com>
  • Loading branch information
jasnell committed Apr 28, 2021
1 parent 3240435 commit eb2b228
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/comment-stalled.yml
Expand Up @@ -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 }}
Expand All @@ -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."
15 changes: 15 additions & 0 deletions .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."

0 comments on commit eb2b228

Please sign in to comment.