Skip to content

Commit

Permalink
Add close-old-issues workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianTM committed Jul 5, 2024
1 parent 07a9e71 commit c78a369
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/close-old-issues.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Close Inactive Issues

on:
schedule:
- cron: '0 0 * * *' # Run daily
workflow_dispatch: # This line enables manual triggering

jobs:
close-issues:
runs-on: ubuntu-latest
permissions:
issues: write # Ensure necessary permissions for issues
pull-requests: none
contents: none
steps:
- name: Close inactive issues
uses: actions/[email protected]
with:
# A list of labels to reference when looking through issues,
# and only when one (or even more) of these labels are found..
# then skip this issue, and never try to stale and/or close it.
exempt-issue-labels: "Keep Issue Open"
# Split it into two months, after one month the issue will be marked as stale,
# after another month have pasted without any update.. the issue will then be closed.
days-before-issue-stale: 31
days-before-issue-close: 31
# NEVER mark PRs as Stale or Close + this workflow should never have write permissions on PRs, EVER!
days-before-pr-stale: -1
days-before-pr-close: -1
# Sends a message for both the Stale and Close events of an issue.
stale-issue-message: "This issue was marked as stale because it has been inactive for 31 days"
close-issue-message: "This issue was closed because it has been inactive for 31 days since it was marked as stale"
# Increase this value if the project receives a lot of
# PRs (yes.. apparently they're processed no matter what) & Issues.
# Default value for it (according to the docs) is 30
operations-per-run: 30
# Make this field equal true if you want to test your configuration if it works correctly or not
debug-only: false
repo-token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit c78a369

Please sign in to comment.