From 9c26ba5932b1f20b2148396db01055683994d5da Mon Sep 17 00:00:00 2001 From: Trial97 Date: Tue, 4 Feb 2025 16:13:55 +0200 Subject: [PATCH 1/5] add stale workflow Signed-off-by: Trial97 --- .github/workflows/stale.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 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 000000000..e0faff447 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,29 @@ +name: Close stale issues and PRs + +on: + schedule: + # run weekly on sunday + - cron: "0 0 * * 0" + workflow_dispatch: + +permissions: + issues: write + pull-requests: write + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v9 + with: + days-before-issue-stale: 14 + days-before-pr-stale: 360 # a year + days-before-close: -1 + days-before-issue-close: 360 # update the issue once a year + days-before-pr-close: -1 + stale-issue-message: "This issue has been inactive for a while. Please add a comment or provide an update if it's still relevant." + stale-pr-message: "This PR has had no recent activity. Please update it if it's still relevant." + close-issue-message: "Closing this issue as it has been marked stale and no further activity was detected. Feel free to reopen if needed." + exempt-issue-labels: rfc,noslate + exempt-all-milestones: true + exempt-all-assignees: true From afe6d4836da303ba8dd0b9c8c731c1b868beb440 Mon Sep 17 00:00:00 2001 From: Alexandru Ionut Tripon Date: Tue, 4 Feb 2025 17:41:36 +0200 Subject: [PATCH 2/5] Update .github/workflows/stale.yml Signed-off-by: Alexandru Ionut Tripon --- .github/workflows/stale.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index e0faff447..534f21382 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -19,7 +19,7 @@ jobs: days-before-issue-stale: 14 days-before-pr-stale: 360 # a year days-before-close: -1 - days-before-issue-close: 360 # update the issue once a year + days-before-issue-close: -1 days-before-pr-close: -1 stale-issue-message: "This issue has been inactive for a while. Please add a comment or provide an update if it's still relevant." stale-pr-message: "This PR has had no recent activity. Please update it if it's still relevant." From 85c2710e33e553d631403651663a0fea3543ab0d Mon Sep 17 00:00:00 2001 From: Alexandru Ionut Tripon Date: Tue, 4 Feb 2025 22:08:16 +0200 Subject: [PATCH 3/5] Apply suggestions from code review Co-authored-by: Seth Flynn Signed-off-by: Alexandru Ionut Tripon --- .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 534f21382..08e3ff8d1 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -1,4 +1,4 @@ -name: Close stale issues and PRs +name: Stale on: schedule: @@ -11,19 +11,23 @@ permissions: pull-requests: write jobs: - stale: + label: + name: Label issues and PRs + runs-on: ubuntu-latest + + permissions: + issues: write + pull-requests: write + steps: - uses: actions/stale@v9 with: - days-before-issue-stale: 14 - days-before-pr-stale: 360 # a year - days-before-close: -1 - days-before-issue-close: -1 - days-before-pr-close: -1 + days-before-issue-stale: 30 + days-before-pr-stale: 30 + days-before-close: -1 # Don't close anything stale-issue-message: "This issue has been inactive for a while. Please add a comment or provide an update if it's still relevant." stale-pr-message: "This PR has had no recent activity. Please update it if it's still relevant." - close-issue-message: "Closing this issue as it has been marked stale and no further activity was detected. Feel free to reopen if needed." - exempt-issue-labels: rfc,noslate + exempt-issue-labels: rfc,nostale exempt-all-milestones: true exempt-all-assignees: true From ac598740b3bc28a568e9b19bbedc77e99d834733 Mon Sep 17 00:00:00 2001 From: Alexandru Ionut Tripon Date: Tue, 4 Feb 2025 22:08:46 +0200 Subject: [PATCH 4/5] Update .github/workflows/stale.yml Signed-off-by: Alexandru Ionut Tripon --- .github/workflows/stale.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 08e3ff8d1..7afc94eed 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -6,9 +6,6 @@ on: - cron: "0 0 * * 0" workflow_dispatch: -permissions: - issues: write - pull-requests: write jobs: label: From 34438824c14089c226670483d89fc342b4fcb17d Mon Sep 17 00:00:00 2001 From: Alexandru Ionut Tripon Date: Tue, 4 Feb 2025 23:15:18 +0200 Subject: [PATCH 5/5] Update .github/workflows/stale.yml Co-authored-by: Seth Flynn Signed-off-by: Alexandru Ionut Tripon --- .github/workflows/stale.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 7afc94eed..c93ea5e87 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -20,8 +20,7 @@ jobs: steps: - uses: actions/stale@v9 with: - days-before-issue-stale: 30 - days-before-pr-stale: 30 + days-before-stale: 30 days-before-close: -1 # Don't close anything stale-issue-message: "This issue has been inactive for a while. Please add a comment or provide an update if it's still relevant." stale-pr-message: "This PR has had no recent activity. Please update it if it's still relevant."