Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meta: post comment when pr labeled fast-track #38446

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
16 changes: 12 additions & 4 deletions .github/workflows/comment-stalled.yml
@@ -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."