Skip to content

Stale check for stalled pull requests in the docs-internal repository #5

Stale check for stalled pull requests in the docs-internal repository

Stale check for stalled pull requests in the docs-internal repository #5

Workflow file for this run

name: Stale check for stalled pull requests in the docs-internal repository
# **What it does**: Identifies pull requests that have been inactive for 30 days.
# **Why we have it**: We want to avoid pull requests that are stalled and not being reviewed.
# **Who does it impact**: Everyone that works in the internal repository.
on:
schedule:
- cron: '20 16 * * 1' # Run each Monday at 16:20 UTC / 8:20 PST
push:
paths:
- .github/workflows/stale.yml
permissions:
contents: read
pull-requests: write
issues: write
jobs:
stale:
if: github.repository == 'github/docs-internal'
runs-on: ubuntu-latest
steps:
- uses: actions/stale@3a9db7e6a41a89f618792c92c0e97cc736e1b13f # v10.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-pr-message: "It looks as if this pull request has been inactive for 30 days. We want to check in with you to see if you plan to continue working on it. If you do, please add a comment to let us know. If we don't hear from you, we will close this pull request after 14 days."
days-before-stale: 30
days-before-close: 14
stale-pr-label: 'stale'
exempt-pr-labels: 'never-stale'
close-pr-label: 'Closed as inactive'
operations-per-run: 150
- name: Print outputs
run: echo "Staled PRs:${{ steps.stale.outputs.staled-issues-prs || '0' }}, Closed 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 }}