From a204fb5d13960cdb0cc84cd90893fa85d87fdb9f Mon Sep 17 00:00:00 2001 From: John Collier Date: Thu, 16 Mar 2023 15:00:16 -0400 Subject: [PATCH] Add workflow for managing stale issues & PRs Adds a GitHub workflow for managing stale & rotten issues and PRs. Issues & PRs are marked stale after 90 days of inactivity. After 60 further days, they are marked as rotten and closed. --- .github/workflows/stale.yaml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/stale.yaml diff --git a/.github/workflows/stale.yaml b/.github/workflows/stale.yaml new file mode 100644 index 000000000..b47aad022 --- /dev/null +++ b/.github/workflows/stale.yaml @@ -0,0 +1,35 @@ +name: Mark stale issues and pull requests + +on: + schedule: + - cron: "0 0 * * *" + +permissions: + contents: read + +jobs: + stale: + + permissions: + issues: write # for actions/stale to close stale issues + pull-requests: write # for actions/stale to close stale PRs + runs-on: ubuntu-latest + + steps: + - uses: actions/stale@v7 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + stale-issue-message: "This issue is stale because it has been open for 90 days with no activity. Remove stale label or comment or this will be closed in 60 days." + stale-pr-message: "This PR is stale because it has been open for 90 days with no activity. Remove stale label or comment or this will be closed in 60 days." + + days-before-stale: 90 + days-before-close: 60 + stale-issue-label: 'lifecycle/stale' + stale-pr-label: 'lifecycle/stale' + exempt-issue-labels: 'lifecycle/frozen' + exempt-pr-labels: 'lifecycle/frozen' + close-issue-label: 'lifecycle/rotten' + close-pr-label: 'lifecycle/rotten' + + start-date: '2023-03-16T00:00:00Z' +