From 2ad2d8ac48097eef73f651893668935d52949b9f Mon Sep 17 00:00:00 2001 From: Matt Liberty Date: Tue, 24 Mar 2026 21:51:28 +0000 Subject: [PATCH] Add stale issues/PRs workflow Adds a GitHub Actions workflow using actions/stale@v10 to automatically label and close inactive issues and pull requests after 60+21 days. Discussion: #9878 Signed-off-by: Matt Liberty --- .github/workflows/github-actions-stale.yml | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/github-actions-stale.yml diff --git a/.github/workflows/github-actions-stale.yml b/.github/workflows/github-actions-stale.yml new file mode 100644 index 0000000000..5deb95b706 --- /dev/null +++ b/.github/workflows/github-actions-stale.yml @@ -0,0 +1,37 @@ +name: Mark stale issues and pull requests + +on: + schedule: + - cron: "0 0 * * *" + workflow_dispatch: + +jobs: + Stale: + runs-on: ${{ vars.USE_SELF_HOSTED == 'true' && 'self-hosted' || 'ubuntu-latest' }} + + permissions: + # Required to label and close stale issues. + issues: write + # Required to label and close stale pull requests. + pull-requests: write + + steps: + - uses: actions/stale@v10 + with: + days-before-stale: 60 + days-before-close: 21 + stale-issue-label: Stale + stale-pr-label: Stale + stale-issue-message: > + This issue has been automatically marked as stale because it has not + had recent activity. It will be closed in 21 days if no further + activity occurs. Remove the `Stale` label or comment to keep it open. + stale-pr-message: > + This pull request has been automatically marked as stale because it + has not had recent activity. It will be closed in 21 days if no + further activity occurs. Remove the `Stale` label or comment to keep + it open. + close-issue-reason: not_planned + exempt-issue-labels: pinned,security + exempt-pr-labels: pinned,security + operations-per-run: 100