Skip to content

Stale check for no activity #1544

Stale check for no activity

Stale check for no activity #1544

name: Public Repo Stale Check
# **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 * * 1-5' # Run every weekday at 16:20 UTC / 8:20 PST
permissions:
contents: read
issues: write
pull-requests: write
jobs:
stale_contributor:
if: github.repository == 'github/docs'
runs-on: ubuntu-latest
steps:
- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'A stale label has been added to this issue and it has been closed, because it has been open for 30 days with no activity. If you think this issue should remain open, please add a new comment.'
days-before-issue-stale: 30
days-before-issue-close: 0
exempt-issue-labels: 'help wanted,never-stale,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.'
days-before-pr-stale: 30
days-before-pr-close: 0
stale-pr-label: 'stale'
exempt-pr-labels: 'waiting for review,never-stale,ready to merge'
- 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 }}
stale_staff:
if: github.repository == 'github/docs'
runs-on: ubuntu-latest
steps:
- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-pr-message: 'This is a gentle bump for the docs team that this PR is waiting for review.'
days-before-issue-stale: -1
days-before-pr-stale: 14
days-before-pr-close: -1 # Never close
remove-stale-when-updated: false
operations-per-run: 100
only-pr-labels: 'waiting for review'
# The hope is that by setting the stale-pr-label to the same label
# as the label that the stale check looks for, this will result in
# a comment being posted every 14 days as an infinite loop, which is what
# we want
stale-pr-label: 'waiting for review'
exempt-pr-labels: 'never-stale'
- 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 }}