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]>

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]>
  • Loading branch information
jasnell committed Apr 30, 2021
1 parent 50991df commit d85929c
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 21 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/comment-labeled.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Comment on issues and PRs when labelled
on:
issues:
types: [labeled]
pull_request_target:
types: [labeled]

jobs:
staleComment:
if: github.repository == 'nodejs/node' && github.event.label.name == 'stalled'
runs-on: ubuntu-latest
steps:
- 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."
21 changes: 0 additions & 21 deletions .github/workflows/comment-stalled.yml

This file was deleted.

0 comments on commit d85929c

Please sign in to comment.