Skip to content

Commit 9107595

Browse files
phillipjaddaleax
authored andcommittedSep 22, 2020
build: comment about auto close when stalled via with github action
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 <jasnell@gmail.com> Reviewed-By: Mary Marchini <oss@mmarchini.me> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Zeyu Yang <himself65@outlook.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Shelley Vohr <codebytere@gmail.com>
1 parent 60774c0 commit 9107595

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
 

‎.github/workflows/comment-stalled.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Comment on issues and PRs when labelled stalled
2+
on:
3+
issues:
4+
types: [labeled]
5+
pull_request_target:
6+
types: [labeled]
7+
8+
jobs:
9+
staleComment:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Post comment
13+
if: github.event.label.name == 'stalled'
14+
env:
15+
COMMENTS_URL: ${{ github.event.issue.comments_url || github.event.pull_request.comments_url }}
16+
run: |
17+
curl -X POST $COMMENTS_URL \
18+
-H "Content-Type: application/json" \
19+
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
20+
--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 commit comments

Comments
 (0)