Skip to content

Commit

Permalink
new file: .github/workflows/issue-close-inactive.yml (#230)
Browse files Browse the repository at this point in the history
new file:   .github/workflows/issue-find-inactive.yml
	new file:   .github/workflows/issue-labeled.yml
	new file:   .github/workflows/issue-remove-inactive.yml

Co-authored-by: Sean Sullivan <ssulliva@redhat.com>
  • Loading branch information
djdanielsson and sean-m-sullivan authored May 14, 2024
1 parent d5f4730 commit 39ba533
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/issue-close-inactive.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
# https://github.com/marketplace/actions/issues-helper
name: Check and close inactive

on:
schedule:
- cron: "0 6 * * *"

jobs:
close-inactive-issues:
runs-on: ubuntu-latest
steps:
- name: close-issues
uses: actions-cool/issues-helper@v3
with:
actions: 'close-issues'
token: ${{ secrets.GITHUB_TOKEN }}
labels: 'inactive'
inactive-day: 7
...
21 changes: 21 additions & 0 deletions .github/workflows/issue-find-inactive.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
# https://github.com/marketplace/actions/issues-helper
name: Check inactive

on:
schedule:
- cron: "0 5 * * *"

jobs:
check-inactive:
runs-on: ubuntu-latest
steps:
- name: check-inactive
uses: actions-cool/issues-helper@v3
with:
actions: 'check-inactive'
token: ${{ secrets.GITHUB_TOKEN }}
inactive-day: 30
issue-state: open
exclude-labels: 'new,enhancement,backlog,help wanted,module-issue,blocked - upstream'
...
22 changes: 22 additions & 0 deletions .github/workflows/issue-labeled.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
# https://github.com/marketplace/actions/issues-helper
name: Issue Labeled

on:
issues:
types: [labeled]

jobs:
issue-labeled:
runs-on: ubuntu-latest
steps:
- name: Create comment
uses: actions-cool/issues-helper@v3
if: github.event.label.name == 'inactive' # || github.event.label.name == 'need info'
with:
actions: 'create-comment'
token: ${{ secrets.GITHUB_TOKEN }}
issue-number: ${{ github.event.issue.number }}
body: |
Hello @${{ github.event.issue.user.login }}. Please ensure that you have filled out the issue template as much as possible and have answered any further questions asked. If you have not done so in the next 7 days this issue will be automatically closed.'
...
22 changes: 22 additions & 0 deletions .github/workflows/issue-remove-inactive.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
# https://github.com/marketplace/actions/issues-helper
name: Issue Remove Labels

on:
issues:
types: [edited, reopened, labeled]
issue_comment:
types: [created, edited]

jobs:
remove-inactive:
runs-on: ubuntu-latest
steps:
- name: remove inactive
if: github.event.issue.state == 'open' && github.event.issue.user != 'github-actions'
uses: actions-cool/issues-helper@v3
with:
actions: 'remove-labels'
issue-number: ${{ github.event.issue.number }}
labels: 'inactive'
...

0 comments on commit 39ba533

Please sign in to comment.