summaryrefslogtreecommitdiff
path: root/.github/workflows/comment-stalled.yml
blob: 1c21505c4ad31759473fd1c5a3f2e3087a46e4c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
name: Comment on issues and PRs when labelled stalled
on:
  issues:
    types: [labeled]
  pull_request_target:
    types: [labeled]

jobs:
  staleComment:
    if: github.repository == 'nodejs/node'
    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." }'