Skip to content

Commit

Permalink
build: comment about auto close when stalled via with github action
Browse files Browse the repository at this point in the history
As part of automatically closing issues and PRs 30 days after they got
labelled with `stalled`, these changes adds a GitHub Action workflow
posting a comment information about what will happen in 30 days upon
being labelled.

PR-URL: #34555
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Mary Marchini <[email protected]>
Reviewed-By: Denys Otrishko <[email protected]>
Reviewed-By: Gus Caplan <[email protected]>
Reviewed-By: Zeyu Yang <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Shelley Vohr <[email protected]>
  • Loading branch information
phillipj authored and addaleax committed Sep 22, 2020
1 parent 60774c0 commit 9107595
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/comment-stalled.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Comment on issues and PRs when labelled stalled
on:
issues:
types: [labeled]
pull_request_target:
types: [labeled]

jobs:
staleComment:
runs-on: ubuntu-latest
steps:
- name: Post comment
if: github.event.label.name == 'stalled'
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." }'

0 comments on commit 9107595

Please sign in to comment.