From c361acb57607d0bc3bce17ea2124efa9541df00d Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Mon, 27 Feb 2023 11:36:29 +0100 Subject: [PATCH 1/6] chore: updated stale-issues workflow --- .github/workflows/stale-issues.yml | 57 ++++++++++++------------------ 1 file changed, 22 insertions(+), 35 deletions(-) diff --git a/.github/workflows/stale-issues.yml b/.github/workflows/stale-issues.yml index 15b5dff177..3b5ba76313 100644 --- a/.github/workflows/stale-issues.yml +++ b/.github/workflows/stale-issues.yml @@ -1,46 +1,33 @@ name: "Close stale issues" -# Controls when the action will run. - on: schedule: - cron: "0 0 * * *" jobs: - cleanup: + check-issues: runs-on: ubuntu-latest - name: Stale issue job + permissions: + issues: write steps: - - uses: aws-actions/stale-issue-cleanup@e1cf8a5d54b4ff316c76f5356079d3a8df84137e + - uses: actions/stale@v7 with: - # Setting messages to an empty string will cause the automation to skip - # that category - ancient-issue-message: Greetings! We’re closing this issue because it has been open a long time and hasn’t been updated in a while and may not be getting the attention it deserves. We encourage you to check if this is still an issue in the latest release and if you find that this is still a problem, please feel free to comment or open a new issue. - stale-issue-message: This issue has not received a response in 2 weeks. If you still think there is a problem, please leave a comment to avoid the issue from automatically closing. - stale-pr-message: This PR has not received a response in 2 weeks. If you still think there is a problem, please leave a comment to avoid the PR from automatically closing. - # These labels are required - stale-issue-label: closing-soon - exempt-issue-label: no-autoclose - stale-pr-label: closing-soon - exempt-pr-label: pr/needs-review - response-requested-label: response-requested - - # Don't set closed-for-staleness label to skip closing very old issues - # regardless of label - closed-for-staleness-label: closed-for-staleness - - # Issue timing - days-before-stale: 14 - days-before-close: 7 - days-before-ancient: 365 - - # If you don't want to mark a issue as being ancient based on a - # threshold of "upvotes", you can set this here. An "upvote" is - # the total number of +1, heart, hooray, and rocket reactions - # on an issue. - minimum-upvotes-to-exempt: 5 - repo-token: ${{ secrets.GITHUB_TOKEN }} - loglevel: DEBUG - # Set dry-run to true to not perform label or close actions. - # dry-run: true + stale-issue-message: "This issue has not received a response in 2 weeks. If you still think there is a problem, please leave a comment to avoid the issue from automatically closing." + close-issue-message: "Greetings! We are closing this issue because it has been open a long time and hasn’t been updated in a while and may not be getting the attention it deserves. We encourage you to check if this is still an issue in the latest release and if you find that this is still a problem, please feel free to comment or reopen the issue." + # Label applied or removed when an issue becomes stale + stale-issue-label: status/pending-close-response-required + remove-stale-when-updated: true + # Label and close type when a stale issue is finally closed + close-issue-label: status/rejected + close-issue-reason: not_planned + # Exempt any issue that hasn't been triaged yet, or that is clearly marked + exempt-issue-labels: triage,status/confirmed,status/blocked,status/on-hold,status/completed + # Include only issues where all these labels are present + any-of-issue-labels: need-more-information,status/discussing + # Settings specific to issues + days-before-issue-stale: 14 + days-before-issue-close: 7 + # Set to ignore PRs + days-before-pr-stale: -1 + days-before-pr-close: -1 \ No newline at end of file From eaf59e7c266b15976b8999a7660abddc9b5a68eb Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Mon, 27 Feb 2023 11:37:03 +0100 Subject: [PATCH 2/6] chore: removed stalebot config --- .github/stale.yml | 16 ---------------- 1 file changed, 16 deletions(-) delete mode 100644 .github/stale.yml diff --git a/.github/stale.yml b/.github/stale.yml deleted file mode 100644 index d6bdd4c29c..0000000000 --- a/.github/stale.yml +++ /dev/null @@ -1,16 +0,0 @@ -only: issues -daysUntilStale: 30 -daysUntilClose: 7 -exemptLabels: - - type/bug - - type/bug-upstream - - type/feature-request - - type/RFC -staleLabel: pending-close-response-required -markComment: > - This issue has been automatically marked as stale because it has not had - recent activity. It will be closed if no further activity occurs. Thank you - for your contributions. -closeComment: > - This issue has been automatically closed because of inactivity. - Please open a new issue if you are still encountering problems. From 4bc067c52dcaa59eb552212ad0740658f0f87ab2 Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Mon, 27 Feb 2023 11:41:31 +0100 Subject: [PATCH 3/6] chore: added action to allowlist --- .github/workflows/on-workflows-push-pr.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/on-workflows-push-pr.yml b/.github/workflows/on-workflows-push-pr.yml index 8664c52c81..5b272f9357 100644 --- a/.github/workflows/on-workflows-push-pr.yml +++ b/.github/workflows/on-workflows-push-pr.yml @@ -21,6 +21,7 @@ jobs: # Trusted GitHub Actions and/or organizations allowlist: | aws-actions/ + actions/stale actions/checkout actions/github-script actions/setup-node From 535b9c78c3f71cb78eb25773bd27967e70c2622b Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Mon, 27 Feb 2023 11:45:09 +0100 Subject: [PATCH 4/6] docs: added note to Maintainers doc --- MAINTAINERS.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS.md b/MAINTAINERS.md index 6792654c1a..c7d31119bc 100644 --- a/MAINTAINERS.md +++ b/MAINTAINERS.md @@ -268,6 +268,8 @@ In other cases, you may have constrained capacity. Use `help=wanted` label when When in doubt, use `need-more-information` or `need-customer-feedback` labels to signal more context and feedback are necessary before proceeding. You can also use `status/on-hold` label when you expect it might take a while to gather enough information before you can decide. +Note that issues marked as `need-more-information` and `status/discussing` will be automatically closed after 3 weeks of inactivity. + ### Crediting contributions We credit all contributions as part of each [release note](https://github.com/awslabs/aws-lambda-powertools-typescript/releases) as an automated process. If you find contributors are missing from the release note you're producing, please add them manually. From 9154af21878a017888f97815c7a7e917ebe94c1d Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Mon, 27 Feb 2023 12:24:25 +0100 Subject: [PATCH 5/6] docs: fixed wording in comments --- .github/workflows/stale-issues.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/stale-issues.yml b/.github/workflows/stale-issues.yml index 3b5ba76313..f93010f35c 100644 --- a/.github/workflows/stale-issues.yml +++ b/.github/workflows/stale-issues.yml @@ -21,10 +21,10 @@ jobs: # Label and close type when a stale issue is finally closed close-issue-label: status/rejected close-issue-reason: not_planned - # Exempt any issue that hasn't been triaged yet, or that is clearly marked + # Exempt any issue that hasn't been triaged yet, or that is clearly labeled exempt-issue-labels: triage,status/confirmed,status/blocked,status/on-hold,status/completed - # Include only issues where all these labels are present - any-of-issue-labels: need-more-information,status/discussing + # Include only issues where any of these labels are present + any-of-issue-labels: need-more-information,status/discussing,status/pending-close-response-required # Settings specific to issues days-before-issue-stale: 14 days-before-issue-close: 7 From 2246b80a749997c63d6c42550bd8701e94e0a7ba Mon Sep 17 00:00:00 2001 From: Andrea Amorosi Date: Mon, 27 Feb 2023 12:36:26 +0100 Subject: [PATCH 6/6] docs: fixed wording in comments --- .github/workflows/stale-issues.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/stale-issues.yml b/.github/workflows/stale-issues.yml index f93010f35c..f3ea84ee3c 100644 --- a/.github/workflows/stale-issues.yml +++ b/.github/workflows/stale-issues.yml @@ -23,7 +23,9 @@ jobs: close-issue-reason: not_planned # Exempt any issue that hasn't been triaged yet, or that is clearly labeled exempt-issue-labels: triage,status/confirmed,status/blocked,status/on-hold,status/completed - # Include only issues where any of these labels are present + # Include only issues where any of these labels are present (aka only issues that need more info from the customer) + # that are either under discussion, but no info/answer has been provided in 2 weeks, or that were already marked + # as stale any-of-issue-labels: need-more-information,status/discussing,status/pending-close-response-required # Settings specific to issues days-before-issue-stale: 14