Skip to content

Mark stale issues and pull requests #664

Mark stale issues and pull requests

Mark stale issues and pull requests #664

Workflow file for this run

# Stale
# ==========================
# Reusable workflow to manage stale issues and pull requests.
# Mainly using [Stale Action](https://github.com/actions/stale), with some opinionated defaults.
name: Mark stale issues and pull requests
on:
schedule:
- cron: "30 1 * * *"
workflow_call:
inputs:
runs-on:
description: "Json array of runner(s) to use. See https://docs.github.com/en/actions/using-jobs/choosing-the-runner-for-a-job"
type: string
default: '["ubuntu-latest"]'
required: false
stale-issue-message:
description: "Comment on the staled issues. See https://github.com/actions/stale#stale-issue-message"
type: string
required: false
stale-pr-message:
description: "Comment on the staled PRs. See https://github.com/actions/stale#stale-pr-message"
type: string
required: false
stale-issue-label:
description: "Label to apply on staled issues. See https://github.com/actions/stale#stale-issue-label"
type: string
required: false
exempt-issue-labels:
description: "Labels on issues exempted from stale. See https://github.com/actions/stale#exempt-issue-labels"
type: string
required: false
stale-pr-label:
description: "Label to apply on staled PRs. See https://github.com/actions/stale#stale-pr-label"
type: string
required: false
exempt-pr-labels:
description: "Labels on PRs exempted from stale. See https://github.com/actions/stale#exempt-pr-labels"
type: string
required: false
permissions:
issues: write
pull-requests: write
jobs:
stale:
runs-on: ${{ inputs.runs-on && fromJson(inputs.runs-on) || 'ubuntu-latest' }}
steps:
- uses: actions/stale@v9
with:
stale-issue-message: ${{ inputs.stale-issue-message || 'This issue is stale' }}
stale-pr-message: ${{ inputs.stale-pr-message || 'This PR is stale' }}
stale-issue-label: ${{ inputs.stale-issue-label || 'no-issue-activity' }}
exempt-issue-labels: ${{ inputs.exempt-issue-labels || 'awaiting-approval,work-in-progress' }}
stale-pr-label: ${{ inputs.stale-pr-label || 'no-pr-activity' }}
exempt-pr-labels: ${{ inputs.exempt-pr-labels || 'awaiting-approval,work-in-progress' }}