Skip to content

Commit

Permalink
chore(ci): automate management of unresponded issues (apache#9927)
Browse files Browse the repository at this point in the history
  • Loading branch information
shreemaan-abhishek authored and rubikplanet committed Aug 8, 2023
1 parent b9566f3 commit 7f0c023
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/close-unresponded.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Check Issues

on:
workflow_dispatch:
schedule:
- cron: '0 10 * * *'

permissions:
contents: read

jobs:
prune_stale:
permissions:
issues: write # for actions/stale to close stale issues
name: Prune Unresponded
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- name: Prune Stale
uses: actions/stale@v8
with:
days-before-issue-stale: 14
days-before-issue-close: 3
stale-issue-message: >
Due to lack of the reporter's response this issue has been labeled with "no response".
It will be close in 3 days if no further activity occurs. If this issue is still
relevant, please simply write any comment. Even if closed, you can still revive the
issue at any time or discuss it on the dev@apisix.apache.org list.
Thank you for your contributions.
close-issue-message: >
This issue has been closed due to lack of activity. If you think that
is incorrect, or the issue requires additional review, you can revive the issue at
any time.
# Issues with these labels will never be considered stale.
only-labels: 'wait for update'
stale-issue-label: 'no response'
ascending: true
19 changes: 19 additions & 0 deletions .github/workflows/update-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Update label when user responds
permissions:
issues: write

on:
issue_comment:
types: [created]

jobs:
run-check:
if: ${{ !github.event.issue.pull_request }} # don't execute for PR comments
runs-on: ubuntu-latest
steps:
- name: update labels when user responds
uses: andymckay/labeler@master
if: ${{ github.event.comment.user.login == github.event.issue.user.login && contains(github.event.issue.labels.*.name, 'wait for update') && !contains(github.event.issue.labels.*.name, 'user responded') }}
with:
add-labels: 'user responded'
remove-labels: 'wait for update'

0 comments on commit 7f0c023

Please sign in to comment.