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 <[email protected]>
  • Loading branch information
jasnell committed Apr 28, 2021
1 parent 3240435 commit eedb34c
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/comment-stalled.yml
Original file line number Diff line number Diff line change
@@ -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]
Expand All @@ -7,15 +7,23 @@ 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: |
curl -X POST $COMMENTS_URL \
-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."

0 comments on commit eedb34c

Please sign in to comment.