From 34340e10e1701cd799c05145e6f01962fc8f933a Mon Sep 17 00:00:00 2001 From: AdmiringWorm Date: Mon, 14 Feb 2022 11:36:40 +0100 Subject: [PATCH] (#1754) Replace Statebot with GitHub action When we renamed the repository previously the stalebot stopped working on this repository, this PR re-adds the stalebot but as part of a daily GitHub action instead. --- .github/stale.yml | 61 ------------------------------------- .github/workflows/stale.yml | 50 ++++++++++++++++++++++++++++++ CONTRIBUTING.md | 4 ++- 3 files changed, 53 insertions(+), 62 deletions(-) delete mode 100644 .github/stale.yml create mode 100644 .github/workflows/stale.yml diff --git a/.github/stale.yml b/.github/stale.yml deleted file mode 100644 index 41449a6405da..000000000000 --- a/.github/stale.yml +++ /dev/null @@ -1,61 +0,0 @@ -# Configuration for probot-stale - https://github.com/probot/stale - -# Number of days of inactivity before an Issue or Pull Request becomes stale -daysUntilStale: 152 - -# Number of days of inactivity before an Issue or Pull Request with the stale label is closed. -# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale. -daysUntilClose: 30 - -# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled) -onlyLabels: [] - -# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable -exemptLabels: - - "Security / CVE" - -# Set to true to ignore issues in a project (defaults to false) -exemptProjects: false - -# Set to true to ignore issues in a milestone (defaults to false) -exemptMilestones: false - -# Set to true to ignore issues with an assignee (defaults to false) -exemptAssignees: false - -# Label to use when marking as stale -staleLabel: "Pending closure" - -# Comment to post when marking as stale. Set to `false` to disable -markComment: > - Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? - -# Comment to post when removing the stale label. -# unmarkComment: > -# Your comment here. - -# Comment to post when closing a stale Issue or Pull Request. -closeComment: > - Dear contributor, - - because this issue seems to be inactive for quite some time now, I've automatically closed it. - If you still feel this is a valid issue, please feel free to re-open the issue. - Thank you for your contribution. - -# Limit the number of actions per hour, from 1-30. Default is 30 -limitPerRun: 30 - -# Limit to only `issues` or `pulls` -# only: issues - -# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls': -pulls: -# daysUntilStale: 30 - markComment: > - This pull request has been automatically marked as stale because it has not had - recent activity. It will be closed in 30 days if no further activity occurs. Thank you - for your contributions. - -# issues: -# exemptLabels: -# - confirmed diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 000000000000..c7eff3e1dd45 --- /dev/null +++ b/.github/workflows/stale.yml @@ -0,0 +1,50 @@ +name: 'Stale Issue and PR Cleanup' +on: + workflow_dispatch: + schedule: + - cron: '0 4 * * *' + +permissions: + issues: write + pull-requests: write + +jobs: + stale: + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v4.1.0 + id: stale + with: + days-before-stale: 60 + days-before-close: 14 + days-before-pr-close: 30 + exempt-all-issue-allignees: + exempt-draft-pr: + stale-issue-label: Pending closure + only-pr-labels: '0 - Waiting on User' + close-issue-label: Unresolved + close-pr-label: 'Unresolved' + exempt-issue-labels: 'Security / CVE,0 - Backlog,1 - Ready for work,2 - Working, 3 - Review, 5 - Push required' + exempt-pr-labels: 'Security / CVE' + labels-to-remove-when-unstale: '0 - Wating on User,Pending closure' + stale-issue-message: | + Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? + This issue will be closed in 14 days if it continues to be inactive. + close-issue-message: | + Dear contributor, + + because this issue seems to have been inactive for quite some time now, I've automatically closed it. + If you still feel this is a valid issue, please feel free to re-open the issue if/when a pull request + have been added. + Thank you for your contribution. + + close-pr-message: | + Dear contributor, + + because this PR seems to have been inactive for 30 days after changes or additional information + was requested, I've automatically closed it. + If you still feel the changes are still valid, please re-open the PR once all changes or additional information + that was requested has been added. + Thank you for your contribution. + - name: Print outputs + run: echo ${{ join(steps.stale.outputs.*, ',') }} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4476c6f1f02a..578e73d839e3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -223,7 +223,9 @@ All contributors should issue pull request containing single package. In special ### 3.3 Open issues and pull request expires after 6 months -Issues and PRs that remain open for 6 months without any feedback may be closed with label [Unresolved](https://github.com/chocolatey-community/chocolatey-packages/issues?utf8=%E2%9C%93&q=label%3AUnresolved%20). +Issues that remain open for 2 months without any activity will be marked as pending closure, if addition 14 days goes by without any activity the issue will be closed with the label [Unresolved](https://github.com/chocolatey-community/chocolatey-packages/issues?utf8=%E2%9C%93&q=label%3AUnresolved%20). + +Pull Requests that have changes requested, and/or is marked with the label [0 - Waiting on User](https://github.com/chocolatey-community/chocolatey-packages/issues?q=is%3Aopen+label%3A%220+-+Waiting+on+User%22+sort%3Aupdated-desc) will be closed after 30 days of inactivity. ### 3.4 Understanding labels