From a37eabba98c15ea7c509392fd09666a640f77849 Mon Sep 17 00:00:00 2001 From: Oren Zipori Date: Tue, 2 Nov 2021 16:52:38 +0200 Subject: [PATCH 1/4] Adding new github workflow for stale issues Adding a Github workflow that will mark issues that didn't have any activity on them for the last 60 days and put a label of stale on them. After 7 days if the stale issue didn't have any updates the issue will be deleted. --- .github/workflows/stale.yaml | 16 ++++++++++++++++ 1 file changed, 16 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 0000000..f94a436 --- /dev/null +++ b/.github/workflows/stale.yaml @@ -0,0 +1,16 @@ +name: 'Close stale issues' +on: + schedule: + - cron: '30 1 * * *' + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v4 + 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.' + close-issue-message: 'This issue was closed because it has been stalled for 5 days with no activity.' + days-before-stale: 60 + days-before-close: 7 + From de34cd2e8ca07a5272d448df7d0cbf06a5a514c2 Mon Sep 17 00:00:00 2001 From: Tim Byrne Date: Wed, 22 Dec 2021 11:59:31 -0600 Subject: [PATCH 2/4] Change extension to match other workflows --- .github/workflows/{stale.yaml => stale.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{stale.yaml => stale.yml} (100%) diff --git a/.github/workflows/stale.yaml b/.github/workflows/stale.yml similarity index 100% rename from .github/workflows/stale.yaml rename to .github/workflows/stale.yml From ec307ce4f88bd0d69e9a12ed0963dbe3b3c80632 Mon Sep 17 00:00:00 2001 From: Tim Byrne Date: Wed, 22 Dec 2021 12:07:36 -0600 Subject: [PATCH 3/4] Update yaml formatting --- .github/workflows/stale.yml | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index f94a436..3e3ae54 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -1,16 +1,20 @@ -name: 'Close stale issues' -on: +--- +name: Close Stale Issues +on: # yamllint disable-line rule:truthy schedule: - - cron: '30 1 * * *' - + - cron: "30 1 * * *" # Daily jobs: - stale: + Stale: runs-on: ubuntu-latest steps: - uses: actions/stale@v4 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.' - close-issue-message: 'This issue was closed because it has been stalled for 5 days with no activity.' - days-before-stale: 60 + close-issue-message: >- + This issue was closed because it has been stalled for 5 days with + no activity. days-before-close: 7 - + days-before-stale: 60 + 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. From 0cac436219d908ec6d7e94cc9b914e92fecaaf53 Mon Sep 17 00:00:00 2001 From: Tim Byrne Date: Wed, 22 Dec 2021 12:11:18 -0600 Subject: [PATCH 4/4] Tweak stale workflow - Add issue exemptions - Use all lowercase label - Update issue comments --- .github/workflows/stale.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 3e3ae54..5cce725 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -10,11 +10,16 @@ jobs: - uses: actions/stale@v4 with: close-issue-message: >- - This issue was closed because it has been stalled for 5 days with - no activity. + This issue was closed because it has been labeled as stale for 7 + days with no activity. days-before-close: 7 days-before-stale: 60 + exempt-all-assignees: true + exempt-issue-labels: in develop + exempt-pr-labels: in develop + stale-issue-label: stale 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. + This issue has been labeled as 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-label: stale