From 3652241a42be8e1cc699719f97ff7af2c7ca86c5 Mon Sep 17 00:00:00 2001 From: Anton Gilgur <4970083+agilgur5@users.noreply.github.com> Date: Tue, 9 Jan 2024 15:25:31 -0500 Subject: [PATCH] ci: add Stale Action for specifically labeled issues and PRs (#12488) --- .github/workflows/stale.yaml | 41 ++++++++++++++++++++++++++++++++++++ docs/CONTRIBUTING.md | 11 +++++++++- 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/stale.yaml diff --git a/.github/workflows/stale.yaml b/.github/workflows/stale.yaml new file mode 100644 index 000000000000..25025522ef70 --- /dev/null +++ b/.github/workflows/stale.yaml @@ -0,0 +1,41 @@ +# https://github.com/actions/stale +name: Mark stale issues and pull requests + +on: + schedule: + - cron: '0 2 * * *' # once a day at 2am + +permissions: + contents: read + +jobs: + stale: + permissions: + issues: write # for commenting on an issue and editing labels + pull-requests: write # for commenting on a PR and editing labels + runs-on: ubuntu-latest + steps: + - uses: actions/stale@v9 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + # timing + days-before-stale: 14 # 2 weeks of inactivity + days-before-close: 14 # 2 more weeks of inactivity + # labels to watch for, add, and remove + only-labels: 'more information needed' # only mark issues/PRs as stale if they have this label + labels-to-remove-when-unstale: 'more information needed' # remove label when unstale -- should be manually added back if information is insufficient + stale-issue-label: 'stale' + stale-pr-label: 'stale' + # automated messages to issue/PR authors + stale-issue-message: > + This issue has been automatically marked as stale because it has not had recent activity and needs more information. + It will be closed if no further activity occurs. + stale-pr-message: > + This PR has been automatically marked as stale because it has not had recent activity and needs further changes. + It will be closed if no further activity occurs. + close-issue-message: > + This issue has been closed due to inactivity and lack of information. + If you still encounter this issue, please add the requested information and re-open. + close-pr-message: + This PR has been closed due to inactivity and lack of changes. + If you would like to still work on this PR, please address the review comments and re-open. diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 87e00b7a2240..6d70ab64033e 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -120,7 +120,16 @@ Any bugs with 3-4 "👍" reactions should be labeled at least `P2`. Bugs can be [sorted by "👍"](https://github.com/argoproj/argo-workflows/issues?q=is%3Aissue+is%3Aopen+sort%3Areactions-%2B1-desc+label%3Abug). If the issue is determined to be a user error and not a bug, remove the `bug` label (and the `regression` label, if applicable) and replace it with the `support` label. -If more information is needed from the author to diagnose the issue, then apply the `more-information-needed` label. +If more information is needed from the author to diagnose the issue, then apply the `more information needed` label. + +##### Staleness + +Only issues and PRs that have the [`more information needed` label](https://github.com/argoproj/argo-workflows/labels/more%20information%20needed) will be considered for staleness. + +If the author does not respond timely to a request for more information, the issue or PR will be automatically marked with the `stale` label and a bot message. +Subsequently, if there is still no response, it will be automatically closed as "not planned". + +See the [Stale Action configuration](https://github.com/argoproj/argo-workflows/blob/main/.github/workflows/stale.yaml) for more details. ## Sustainability Effort