Skip to content

Commit e4ea131

Browse files
rjan90BigLepgalargh
authored
feat(ci): add stale branch workflow (#12858)
* ci: add stale branch workflow ci: add stale branch workflow * chore: update regex-filter chore: update regex-filter * Update .github/workflows/stale-branches Co-authored-by: Steve Loeppky <[email protected]> * chore: document values in workflow chore: document values in workflow * Update .github/workflows/stale-branches Co-authored-by: Piotr Galar <[email protected]> --------- Co-authored-by: Steve Loeppky <[email protected]> Co-authored-by: Piotr Galar <[email protected]>
1 parent 2ead861 commit e4ea131

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/stale-branches

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# .github/workflows/stale-branches.yml
2+
3+
name: Stale Branches
4+
5+
on:
6+
schedule:
7+
- cron: '0 12 * * *'
8+
9+
permissions:
10+
issues: write
11+
contents: write
12+
13+
jobs:
14+
stale_branches:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Stale Branches
18+
uses: crs-k/stale-branches@c6e09a3de1046d68b21eccdca23321d0ec277964 # v7.0.0
19+
with:
20+
repo-token: '${{ secrets.GITHUB_TOKEN }}'
21+
days-before-stale: 180 #Number of days a branch has been inactive before it is considered stale and a 'stale branch 🗑️' issue is opened.
22+
days-before-delete: 360 #Number of days a branch has been inactive before it is deleted.
23+
comment-updates: false #comment with updated information will be added to existing issues each workflow run.
24+
max-issues: 20 #the number of 'stale branch 🗑️' issues that can exist. Also, max number of branches that can be deleted per run.
25+
tag-committer: true #when an issue is opened, the last committer will be tagged in the comments.
26+
stale-branch-label: 'stale branch 🗑️' #Label applied to issues created for stale branches. Must be unique to this workflow.
27+
compare-branches: 'info' #compares each branch to the repo's default branch. When set to info, additional output describes if the current branch is ahead, behind, diverged, or identical to the default branch.
28+
branches-filter-regex: ''^(?!release)' #Optional Regex that will be used to filter branches from this action
29+
include-protected-branches: false #If this is enabled, the action will include protected branches in the process.
30+
rate-limit: true #If this is enabled, the action will stop if it exceeds 95% of the GitHub API rate limit.
31+
pr-check: false #If this is enabled, the action will first check for incoming/outgoing PRs associated with the branch.
32+
dry-run: true #when enabled, the action will not delete or tag any branches. If a branch has an active pr, it will be ignored.
33+
ignore-issue-interaction: false #If this is enabled, the action will not interact with Github issues.

0 commit comments

Comments
 (0)