Repository navigation
Stale check for issues or PRs with "needs SME" label #1272
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 issues or PRs with "needs SME" label | |
| # Public issues and PRs waiting on subject matter expert review get stale reminders without automatic closure. | |
| on: | |
| schedule: | |
| - cron: '20 16 * * 1' | |
| permissions: | |
| contents: read | |
| issues: write | |
| pull-requests: write | |
| jobs: | |
| stale_needs-sme: | |
| if: ${{ github.repository == 'github/docs' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/stale@4391f3da665fdf50b6810c1a66712fb9ba21aa93 # v11.0.0 | |
| id: stale | |
| with: | |
| only-labels: needs SME | |
| days-before-stale: 28 # SME backlog volume needs a slower reminder cadence. | |
| stale-issue-message: 'This is a gentle reminder for the Technical Content team that this issue is waiting for technical review by a subject matter expert (SME).' | |
| stale-issue-label: 'Waiting on SME review' | |
| days-before-issue-close: -1 # Keep issues open. | |
| stale-pr-message: 'This is a gentle reminder for the Technical Content team that this PR is waiting for technical review by a subject matter expert.' | |
| stale-pr-label: 'Waiting on SME review' | |
| days-before-pr-close: -1 # Keep PRs open. | |
| - name: Print outputs | |
| env: | |
| STALED: ${{ steps.stale.outputs.staled-issues-prs || '0' }} | |
| CLOSED: ${{ steps.stale.outputs.closed-issues-prs || '0' }} | |
| run: echo "Staled issues/PRs:${STALED}, Closed issues/PRs:${CLOSED}" | |
| - name: Check out repo | |
| if: ${{ failure() }} | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - uses: ./.github/actions/create-workflow-failure-issue | |
| id: create-failure-issue | |
| if: ${{ failure() }} | |
| with: | |
| token: ${{ secrets.DOCS_BOT_PAT_BASE }} | |
| - uses: ./.github/actions/slack-alert | |
| if: ${{ failure() }} | |
| with: | |
| slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} | |
| issue_url: ${{ steps.create-failure-issue.outputs.issue_url }} |