From be57819e01ac95cd85d85bd9295ef9add0dd1dd8 Mon Sep 17 00:00:00 2001 From: Nara Kasbergen Kwon <855115+xiehan@users.noreply.github.com> Date: Fri, 4 Aug 2023 12:17:42 +0200 Subject: [PATCH 1/2] chore: remove waiting-on-answer label on comments This currently happens automagically if the 'stale' label has already been applied by the bot but not if the user replies before the 'stale' label gets added. --- .../workflows/remove-waiting-on-answer.yml | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/remove-waiting-on-answer.yml diff --git a/.github/workflows/remove-waiting-on-answer.yml b/.github/workflows/remove-waiting-on-answer.yml new file mode 100644 index 0000000000..7c3c0ad892 --- /dev/null +++ b/.github/workflows/remove-waiting-on-answer.yml @@ -0,0 +1,24 @@ +name: Remove waiting-on-answer label after new comments + +permissions: + issues: write + pull-requests: write + +on: + issue_comment: + types: [created] + +jobs: + commented: + name: On comment + if: | + contains(github.event.issue.labels.*.name, 'waiting-on-answer') && !contains(github.event.issue.labels.*.name, 'stale') && + github.event.comment.author_association != 'OWNER' && github.event.comment.author_association != 'MEMBER' && + github.event.comment.author_association != 'COLLABORATOR' && github.actor != 'github-actions[bot]' + runs-on: ubuntu-latest + steps: + - name: Remove waiting-on-answer label + run: gh issue edit $NUMBER --remove-label "waiting-on-answer" + env: + NUMBER: ${{ github.event.issue.number }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 24a554244574533c19cb0a5932a3d2a2027759e3 Mon Sep 17 00:00:00 2001 From: Nara Kasbergen Kwon <855115+xiehan@users.noreply.github.com> Date: Fri, 4 Aug 2023 12:20:05 +0200 Subject: [PATCH 2/2] chore: lower threshold for stale issues to 15 days --- .github/workflows/stale.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index b06366787d..717bffe321 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -2,6 +2,7 @@ name: Close stale issues and PRs permissions: issues: write + pull-requests: write on: schedule: @@ -13,10 +14,10 @@ jobs: steps: - uses: actions/stale@1160a2240286f5da8ec72b1c0816ce2481aabf84 # v8.0.0 with: - # For issues: post a "warning" message after 30 days, then close if another 30 days pass without a response. In another workflow, issues closed for 30 days will be locked. - stale-issue-message: "Hi there! 👋 We haven't heard from you in 30 days and would like to know if the problem has been resolved or if you still need help. If we don't hear from you before then, I'll auto-close this issue in 30 days." - close-issue-message: "I'm closing this issue because we haven't heard back in 60 days. ⌛️ If you still need help, feel free to comment or reopen the issue!" - days-before-issue-stale: 30 + # For issues: post a "warning" message after 15 days, then close if another 30 days pass without a response. In another workflow, issues closed for 30 days will be locked. + stale-issue-message: "Hi there! 👋 We haven't heard from you in 15 days and would like to know if the problem has been resolved or if you still need help. If we don't hear from you before then, I'll auto-close this issue in 30 days." + close-issue-message: "I'm closing this issue because we haven't heard back in 45 days. ⌛️ If you still need help, feel free to comment or reopen the issue!" + days-before-issue-stale: 15 days-before-issue-close: 30 stale-issue-label: stale only-issue-labels: waiting-on-answer