Stale check for no activity #133
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Stale check for no activity | |
| # **What it does**: Provides more aggressive stale checks in the open repo. | |
| # **Why we have it**: In the open repo, we want more aggressive stale checking. | |
| # **Who does it impact**: Anyone working in the open repo. | |
| on: | |
| schedule: | |
| - cron: '20 16 * * 2' # Run each Tuesday at 16:20 UTC / 8:20 PST | |
| permissions: | |
| contents: read | |
| issues: write | |
| pull-requests: write | |
| jobs: | |
| stale_contributor: | |
| name: Identify and close stale issues and PRs | |
| if: github.repository == 'github/docs' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/stale@3a9db7e6a41a89f618792c92c0e97cc736e1b13f # v10.0.0 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| days-before-stale: 30 | |
| days-before-close: 7 | |
| stale-issue-message: 'A stale label has been added to this issue, because it has been open for 30 days with no activity. If you think this issue should remain open, please add a new comment.' | |
| exempt-issue-labels: 'help wanted,never-stale,waiting for review' | |
| stale-issue-label: 'Inactive' | |
| close-issue-label: 'Closed as inactive' | |
| exempt-pr-labels: 'never-stale,ready to merge,waiting for review' | |
| stale-pr-message: 'A stale label has been added to this pull request because it has been open 30 days with no activity. If you think this pull request should remain open, please add a new comment.' | |
| stale-pr-label: 'Inactive' | |
| close-pr-label: 'Closed as inactive' | |
| # Both output options are set true for debugging. | |
| # The numbers should always match unless we change `days-before-close` from `0`. | |
| staled-issues-prs: true # report issues and PRs that were commented on as stale in the output | |
| closed-issues-prs: true # report issues and PRs that were closed in the output | |
| - name: Check out repo | |
| if: ${{ failure() }} | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - uses: ./.github/actions/slack-alert | |
| if: ${{ failure() }} | |
| with: | |
| slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} | |
| slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} | |
| stale_staff: | |
| name: Remind staff about PRs waiting for review | |
| if: github.repository == 'github/docs' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/stale@3a9db7e6a41a89f618792c92c0e97cc736e1b13f # v10.0.0 | |
| with: | |
| repo-token: ${{ secrets.GITHUB_TOKEN }} | |
| only-labels: 'waiting for review' | |
| days-before-pr-stale: 14 | |
| days-before-pr-close: -1 # Never close | |
| operations-per-run: 100 | |
| stale-pr-message: 'This is a gentle reminder for the docs team that this pull request is waiting for review.' | |
| stale-pr-label: 'Waiting on Docs team review' | |
| - name: Print outputs | |
| run: echo "Staled issues/PRs:${{ steps.stale.outputs.staled-issues-prs || '0' }}, Closed issues/PRs:${{ steps.stale.outputs.closed-issues-prs || '0' }}" | |
| - name: Check out repo | |
| if: ${{ failure() }} | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - uses: ./.github/actions/slack-alert | |
| if: ${{ failure() }} | |
| with: | |
| slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} | |
| slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} |