From 9a420d61d06ee813037c20d4bba1289aca3e251a Mon Sep 17 00:00:00 2001 From: Tom Webber Date: Tue, 13 Aug 2024 15:17:42 +0100 Subject: [PATCH 1/2] feat: add workflow for staling prs and issues --- .github/workflows/issue-pr-staler.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/issue-pr-staler.yml diff --git a/.github/workflows/issue-pr-staler.yml b/.github/workflows/issue-pr-staler.yml new file mode 100644 index 00000000..0122b6f1 --- /dev/null +++ b/.github/workflows/issue-pr-staler.yml @@ -0,0 +1,23 @@ +name: 'Close stale issues and PRs' +on: + schedule: + - cron: '30 1 * * *' + +permissions: + contents: write # only for delete-branch option + issues: write + pull-requests: write + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v9 + with: + stale-issue-message: 'This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.' + stale-pr-message: 'This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.' + close-issue-message: 'This issue was closed because it has been stalled for 7 days with no activity.' + exempt-pr-labels: dependencies + days-before-stale: 60 + days-before-close: 7 + days-before-pr-close: -1 \ No newline at end of file From ad9250be49e512af8359b351b8f122b2b88641bc Mon Sep 17 00:00:00 2001 From: Tom Webber Date: Tue, 13 Aug 2024 15:26:37 +0100 Subject: [PATCH 2/2] docs: remove inaccurate part of stale-pr-message --- .github/workflows/issue-pr-staler.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/issue-pr-staler.yml b/.github/workflows/issue-pr-staler.yml index 0122b6f1..24cd0177 100644 --- a/.github/workflows/issue-pr-staler.yml +++ b/.github/workflows/issue-pr-staler.yml @@ -15,7 +15,7 @@ jobs: - uses: actions/stale@v9 with: stale-issue-message: 'This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.' - stale-pr-message: 'This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.' + stale-pr-message: 'This PR is stale because it has been open 60 days with no activity.' close-issue-message: 'This issue was closed because it has been stalled for 7 days with no activity.' exempt-pr-labels: dependencies days-before-stale: 60