From cf9d209bdeaeda265f7e2b38d362f438db6e897c Mon Sep 17 00:00:00 2001 From: Bruce Arctor <5032356+brucearctor@users.noreply.github.com> Date: Mon, 13 Jul 2026 23:07:53 -0700 Subject: [PATCH] ci: add stale issue/PR bot Add GitHub Actions workflow using actions/stale@v9 to automatically mark and close inactive issues and PRs. - Issues stale after 90 days, closed after 14 more days - PRs stale after 60 days, closed after 14 more days - Runs weekly (Monday 6am UTC) + manual dispatch - Exempts: anything with a milestone, bug/security/process/enhancement labels Closes #43 --- .github/workflows/stale.yml | 68 +++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 .github/workflows/stale.yml diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 0000000..1cd9130 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,68 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +name: Close stale issues + +on: + schedule: + - cron: '0 6 * * 1' # Weekly, Monday 6am UTC + workflow_dispatch: {} # Allow manual runs + +permissions: + issues: write + pull-requests: write + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v9 + with: + # Timing + days-before-stale: 90 + days-before-close: 14 + days-before-pr-stale: 60 + days-before-pr-close: 14 + + # Labels + stale-issue-label: 'stale' + stale-pr-label: 'stale' + + # Messages + stale-issue-message: > + This issue has been automatically marked as stale because it has not + had recent activity. It will be closed in 14 days if no further + activity occurs. If this issue is still relevant, please comment or + remove the stale label. + close-issue-message: > + This issue has been automatically closed due to inactivity. + Feel free to reopen if this is still relevant. + stale-pr-message: > + This pull request has been automatically marked as stale because it + has not had recent activity. It will be closed in 14 days if no + further activity occurs. + close-pr-message: > + This pull request has been automatically closed due to inactivity. + Feel free to reopen if this is still relevant. + + # Exemptions — don't stale triaged or important issues + exempt-all-milestones: true + exempt-issue-labels: 'bug,security,process,enhancement' + exempt-pr-labels: 'bug,security' + + # Limits + operations-per-run: 30