From 0f83587ff774db821d33facb8e5b565d757bd84b Mon Sep 17 00:00:00 2001 From: Graham Tackley Date: Fri, 20 Oct 2023 17:57:00 +0100 Subject: [PATCH] chore: add stale tracking for old issues and PRs --- .github/workflows/stale.yaml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 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 00000000..a92be72d --- /dev/null +++ b/.github/workflows/stale.yaml @@ -0,0 +1,26 @@ +on: + schedule: + - cron: "42 3 * * *" + +# see https://docs.github.com/en/actions/managing-issues-and-pull-requests/closing-inactive-issues +jobs: + stale-issues: + name: Close inactive issues and PRs + runs-on: ubuntu-latest + permissions: + issues: write + pull-requests: write + steps: + - uses: actions/stale@1160a2240286f5da8ec72b1c0816ce2481aabf84 # v8.0.0 + with: + days-before-issue-stale: 365 + days-before-issue-close: 7 + stale-issue-label: "stale" + stale-issue-message: "This issue is stale because it has been open for over a year with no activity. Remove stale label or add a comment to avoid this being closed in a weeks time." + close-issue-message: "This issue was closed because it has been inactive for a week since being marked as stale." + days-before-pr-stale: 60 + days-before-pr-close: 7 + stale-pr-label: "stale" + stale-pr-message: "This PR is stale because it has been open for two months with no activity. Remove stale label or add a comment to avoid this being closed in a weeks time." + close-pr-message: "This PR was closed because it has been inactive for a week since being marked as stale." + ascending: true