Skip to content

Commit 742c08f

Browse files
authored
Merge pull request #367 from rabbitmq/stale-automation
Add automation to auto-mark issues & PRs as stale
2 parents 9bb6f8c + c16ceb0 commit 742c08f

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

.github/workflows/stale.yml

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Mark stale issues and pull requests
2+
on:
3+
schedule:
4+
- cron: "0 0 * * 1"
5+
# Allow the build to be manually triggered
6+
workflow_dispatch:
7+
jobs:
8+
stale:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Close Stale Issues
12+
uses: actions/[email protected]
13+
with:
14+
# Token for the repository. Can be passed in using `{{ secrets.GITHUB_TOKEN }}`.
15+
repo-token: ${{ secrets.GITHUB_TOKEN }}
16+
# The message to post on the issue when tagging it. If none provided, will not mark issues stale.
17+
stale-issue-message: "This issue has been marked as stale due to 90 days of inactivity. Stale issues will be closed after a further 30 days of inactivity; please remove the stale label in order to prevent this occurring."
18+
# The message to post on the pr when tagging it. If none provided, will not mark pull requests stale.
19+
stale-pr-message: "This pull request has been marked as stale due to 90 days of inactivity. Stale PRs will be closed after a further 30 days of inactivity; please remove the stale label in order to prevent this occurring."
20+
# The message to post on the issue when closing it. If none provided, will not comment when closing an issue.
21+
close-issue-message: "Closing stale issue due to further inactivity."
22+
# The message to post on the pr when closing it. If none provided, will not comment when closing a pull requests.
23+
close-pr-message: "Closing stale PR due to further inactivity."
24+
# The number of days old an issue can be before marking it stale. Set to -1 to never mark issues or pull requests as stale automatically.
25+
days-before-stale: 90
26+
# The number of days to wait to close an issue or pull request after it being marked stale. Set to -1 to never close stale issues.
27+
days-before-close: 30
28+
# The label to apply when an issue is stale.
29+
stale-issue-label: "stale"
30+
# The label to apply when an issue is closed.
31+
close-issue-label: "closed-stale"
32+
# The labels to apply when an issue is exempt from being marked stale. Separate multiple labels with commas (eg. "label1,label2")
33+
exempt-issue-labels: "never-stale"
34+
# The label to apply when a pull request is stale.
35+
stale-pr-label: "stale"
36+
# The label to apply when a pull request is closed.
37+
close-pr-label: "closed-stale"
38+
# The labels to apply when a pull request is exempt from being marked stale. Separate multiple labels with commas (eg. "label1,label2")
39+
exempt-pr-labels: "never-stale"
40+
# Only issues or pull requests with all of these labels are checked if stale. Defaults to `[]` (disabled) and can be a comma-separated list of labels.
41+
only-labels: # optional, default is
42+
# The maximum number of operations per run, used to control rate limiting.
43+
operations-per-run: # optional, default is 30
44+
# Remove stale labels from issues when they are updated or commented on.
45+
remove-stale-when-updated: false
46+
# Run the processor in debug mode without actually performing any operations on live issues.
47+
debug-only: true # Until we verify that this actually works!
48+
# The order to get issues or pull requests. Defaults to false, which is descending
49+
ascending: # optional
50+
# Skip adding stale message when marking a pull request as stale.
51+
skip-stale-pr-message: # optional
52+
# Skip adding stale message when marking an issue as stale.
53+
skip-stale-issue-message: # optional

0 commit comments

Comments
 (0)