Stale check for issues or PRs with "needs SME" label #1210
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 | |
# **What it does**: Runs only in the OS repository to provide stale checks on issues/PRs that need SME(subject matter expert) review. | |
# **Why we have it**: In the open repo, we want we want to check on issues/PRs that are waiting on SME review. | |
# **Who does it impact**: Anyone working in the open repo. | |
on: | |
schedule: | |
- cron: '20 16 * * 3' # Run each Wedneday at 16:20 UTC / 8:20 PST | |
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@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0 | |
with: | |
only-labels: needs SME | |
days-before-stale: 28 # adds stale label if no activity for 7 days - temporarily changed to 28 days as we work through the backlog | |
stale-issue-message: 'This is a gentle reminder for the docs 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 # never close | |
stale-pr-message: 'This is a gentle reminder for the docs 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 # never close | |
- 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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- uses: ./.github/actions/slack-alert | |
if: ${{ failure() }} | |
with: | |
slack_channel_id: ${{ secrets.DOCS_ALERTS_SLACK_CHANNEL_ID }} | |
slack_token: ${{ secrets.SLACK_DOCS_BOT_TOKEN }} |