Skip to content

Commit

Permalink
Close issues with no user response (#4)
Browse files Browse the repository at this point in the history
* Create issues-no-response.yml

* Update issues-no-response.yml

* Create on-comment-remove-label.yml
  • Loading branch information
josxha authored Feb 6, 2024
1 parent fa4393e commit 54f25ee
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/issues-no-response.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Close issues with no user response
on:
schedule:
- cron: "0 0 * * *"

jobs:
close-issues:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v5
with:
days-before-issue-stale: 21
days-before-issue-close: 7
stale-issue-label: "stale"
stale-issue-message: "This issue is stale because it has been marked with `waiting for user response` but hasn't received any activity since 3 weeks."
close-issue-message: "This issue was closed because it has been inactive another week since being marked as stale."
days-before-pr-stale: -1
days-before-pr-close: -1
remove-stale-when-updated: true
any-of-labels: "waiting for user response"
labels-to-remove-when-unstale: "waiting for user response,stale"
repo-token: ${{ secrets.GITHUB_TOKEN }}
23 changes: 23 additions & 0 deletions .github/workflows/on-comment-remove-label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Remove `waiting for user response` label
on:
issue_comment:
types: [ created ]

jobs:
remove-label:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- name: Remove `waiting for user response` label if exists
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
await github.issues.removeLabel({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.issue.number,
name: ["waiting for user response"]
});

0 comments on commit 54f25ee

Please sign in to comment.