Skip to content

Commit

Permalink
ci(stale-issues.yml): add stale action to Github CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mion00 committed Mar 3, 2023
1 parent 0ca97c8 commit af92e3e
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/stale-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# First mark the issue as `stale` according to `days-before-stale`, then close it if no activity for `days-before-close`
name: 'Close stale issues and PRs'
on:
schedule:
# run at 00:30 on Sunday UTC
- cron: '30 0 * * 0'
# To manually trigger from Github UI and debug this workflow
workflow_dispatch:

permissions:
# To label and close issues
issues: write
# To label and close PR
pull-requests: write

# For debug purposes
env:
DRY_RUN: "true"

jobs:
# Consider ONLY issue with label `question` OR `wait-response`
stale_labeled:
name: question, wait-response
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v7
with:
stale-issue-message: 'This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 15 days.'
close-issue-message: 'Please re-open this issue whenever you have new information available'
days-before-stale: 45
days-before-close: 15
any-of-labels: "question,wait-response"
debug-only: "${{ env.DRY_RUN }}"

# Consider ONLY issues that DO NOT have any of the labels defined below
stale_unlabeled:
name: without label
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v7
with:
stale-issue-message: 'This issue is stale because it has been open 6 months with no activity. Remove stale label or comment or this will be closed in 15 days.'
close-issue-message: 'Please re-open this issue whenever you have new information available'
days-before-stale: 180
days-before-close: 15
exempt-issue-labels: "bug,enhancement,question,wait-response,Work In Progress"
debug-only: "${{ env.DRY_RUN }}"

0 comments on commit af92e3e

Please sign in to comment.