Skip to content

Commit da3a44c

Browse files
committed
Add close-old-issues workflow
1 parent bbb5963 commit da3a44c

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Close Inactive Issues
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *' # Run daily
6+
workflow_dispatch: # This line enables manual triggering
7+
8+
jobs:
9+
close-issues:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
issues: write # Ensure necessary permissions for issues
13+
pull-requests: none
14+
contents: none
15+
steps:
16+
- name: Close inactive issues
17+
uses: actions/[email protected]
18+
with:
19+
# A list of labels to reference when looking through issues,
20+
# and only when one (or even more) of these labels are found..
21+
# then skip this issue, and never try to stale and/or close it.
22+
exempt-issue-labels: "Keep Issue Open"
23+
# Split it into two months, after one month the issue will be marked as stale,
24+
# after another month have pasted without any update.. the issue will then be closed.
25+
days-before-issue-stale: 31
26+
days-before-issue-close: 31
27+
# NEVER mark PRs as Stale or Close + this workflow should never have write permissions on PRs, EVER!
28+
days-before-pr-stale: -1
29+
days-before-pr-close: -1
30+
# Sends a message for both the Stale and Close events of an issue.
31+
stale-issue-message: "This issue was marked as stale because it has been inactive for 31 days"
32+
close-issue-message: "This issue was closed because it has been inactive for 31 days since it was marked as stale"
33+
# Increase this value if the project receives a lot of
34+
# PRs (yes.. apparently they're processed no matter what) & Issues.
35+
# Default value for it (according to the docs) is 30
36+
operations-per-run: 30
37+
# Make this field equal true if you want to test your configuration if it works correctly or not
38+
debug-only: false
39+
repo-token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)