From 914e29210ae746ed78c240b3f037611e0e8bd149 Mon Sep 17 00:00:00 2001 From: Brady Wetherington Date: Wed, 26 Jun 2024 18:53:01 +0100 Subject: [PATCH 1/4] Initial rough stab at re-implementing stalebot --- .github/workflows/stale.yml | 13 +++++++++++++ 1 file changed, 13 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..f03790d90 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,13 @@ +name: 'Close stale issues' +on: + schedule: + - cron: '30 1 * * *' + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v9 + with: + stale-issue-message: 'Message to comment on stale issues. If none provided, will not mark issues stale' +# stale-pr-message: 'Message to comment on stale PRs. If none provided, will not mark PRs stale' \ No newline at end of file From 97e3af8fc989f0b03db39e984c45ba540f7f8ed7 Mon Sep 17 00:00:00 2001 From: Brady Wetherington Date: Sat, 29 Jun 2024 00:59:47 +0100 Subject: [PATCH 2/4] WIP on new GitHub-backed stalebot settings --- .github/stale.yml | 27 --------------------------- .github/workflows/stale.yml | 33 ++++++++++++++++++++++++++++++++- 2 files changed, 32 insertions(+), 28 deletions(-) diff --git a/.github/stale.yml b/.github/stale.yml index 53acc282e..82c01c9ce 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -1,7 +1,3 @@ -# Number of days of inactivity before an issue becomes stale -daysUntilStale: 60 -# Number of days of inactivity before a stale issue is closed -daysUntilClose: 7 # Issues with these labels will never be considered stale exemptLabels: - pinned @@ -14,30 +10,7 @@ exemptLabels: - "💰 bounty" - "✋ bug" -exemptMilestones: true - -# Label to use when marking an issue as stale -staleLabel: stale - -only: issues - # Comment to post when removing the stale label. unmarkComment: > Okay, it looks like this issue or feature request might still be important. We'll re-open it for now. Thank you for letting us know! - -# Comment to post when marking an issue as stale. Set to `false` to disable -markComment: > - Is this still relevant? We haven't heard from anyone in a bit. If so, - please comment with any updates or additional detail. - - This issue has been automatically marked as stale because it has not had - recent activity. It will be closed if no further activity occurs. Don't - take it personally, we just need to keep a handle on things. Thank you - for your contributions! -# Comment to post when closing a stale issue. Set to `false` to disable -closeComment: > - This issue has been automatically closed because it has not had - recent activity. If you believe this is still an issue, please confirm that - this issue is still happening in the most recent version of Snipe-IT and reply - to this thread to re-open it. diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index f03790d90..a32069995 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -3,11 +3,42 @@ 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: 'Message to comment on stale issues. If none provided, will not mark issues stale' + days-before-stale: 60 + days-before-close: 7 + exempt-all-milestones: true + stale-issue-message: > + Is this still relevant? We haven't heard from anyone in a bit. If so, + please comment with any updates or additional detail. + + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Don't + take it personally, we just need to keep a handle on things. Thank you + for your contributions! + close-issue-message: > + This issue has been automatically closed because it has not had + recent activity. If you believe this is still an issue, please confirm that + this issue is still happening in the most recent version of Snipe-IT and reply + to this thread to re-open it. + # There doesn't seem to be a 'reopen issue message'? + # Since there is no 'stale-pr-message' - PR's should not be stale'd + stale-issue-label: stale + exempt-issue-labels: + pinned,security,":woman_technologist: + ready for dev",":moneybag: + bounty",:hand: bug,"🔐 security","👩‍💻 ready for dev","💰 bounty","✋ bug" + + + + # stale-pr-message: 'Message to comment on stale PRs. If none provided, will not mark PRs stale' \ No newline at end of file From 8cbcc237c0c587f05dd5e6e96bb900507c249d84 Mon Sep 17 00:00:00 2001 From: Brady Wetherington Date: Wed, 24 Jul 2024 13:27:31 +0100 Subject: [PATCH 3/4] Cleanup of Stale workflow for GH - set to debug-mode to start --- .github/stale.yml | 16 ---------------- .github/workflows/stale.yml | 23 +++++++++-------------- 2 files changed, 9 insertions(+), 30 deletions(-) delete mode 100644 .github/stale.yml diff --git a/.github/stale.yml b/.github/stale.yml deleted file mode 100644 index 82c01c9ce..000000000 --- a/.github/stale.yml +++ /dev/null @@ -1,16 +0,0 @@ -# Issues with these labels will never be considered stale -exemptLabels: - - pinned - - security - - :woman_technologist: ready for dev - - :moneybag: bounty - - :hand: bug - - "🔐 security" - - "👩‍💻 ready for dev" - - "💰 bounty" - - "✋ bug" - -# Comment to post when removing the stale label. -unmarkComment: > - Okay, it looks like this issue or feature request might still be important. We'll re-open - it for now. Thank you for letting us know! diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index a32069995..61160a124 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -3,17 +3,19 @@ on: schedule: - cron: '30 1 * * *' -permissions: - # contents: write # only for delete-branch option - issues: write - # pull-requests: write - jobs: stale: runs-on: ubuntu-latest + permissions: + # contents: write # only for delete-branch option + issues: write + # pull-requests: write steps: - uses: actions/stale@v9 with: + debug-only: true + operations-per-run: 1000 # just while we're debugging + repo-token: ${{ secrets.GITHUB_TOKEN }} days-before-stale: 60 days-before-close: 7 exempt-all-milestones: true @@ -33,12 +35,5 @@ jobs: # There doesn't seem to be a 'reopen issue message'? # Since there is no 'stale-pr-message' - PR's should not be stale'd stale-issue-label: stale - exempt-issue-labels: - pinned,security,":woman_technologist: - ready for dev",":moneybag: - bounty",:hand: bug,"🔐 security","👩‍💻 ready for dev","💰 bounty","✋ bug" - - - - -# stale-pr-message: 'Message to comment on stale PRs. If none provided, will not mark PRs stale' \ No newline at end of file + exempt-issue-labels: > + pinned,security,:woman_technologist: ready for dev,:moneybag: bounty,:hand: bug,🔐 security,👩‍💻 ready for dev,💰 bounty,✋ bug \ No newline at end of file From bb465dbfaafeb6d42a4ee277d1cfe6d7067dfa34 Mon Sep 17 00:00:00 2001 From: Brady Wetherington Date: Wed, 24 Jul 2024 15:09:23 +0100 Subject: [PATCH 4/4] Cut down run number to 100 from 1000 --- .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 61160a124..14ddea225 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/stale@v9 with: debug-only: true - operations-per-run: 1000 # just while we're debugging + operations-per-run: 100 # just while we're debugging repo-token: ${{ secrets.GITHUB_TOKEN }} days-before-stale: 60 days-before-close: 7