Skip to content

Commit 5628157

Browse files
rahul0216Copilot
andauthored
Clean Stale Branch Workflow (#14050)
* Update cleanup-stale-branch.yaml * Update cleanup-stale-branch.yaml * Update .github/workflows/cleanup-stale-branch.yaml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent c3f12ac commit 5628157

1 file changed

Lines changed: 12 additions & 11 deletions

File tree

.github/workflows/cleanup-stale-branch.yaml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ on:
1111

1212
permissions:
1313
contents: write
14+
actions: read
15+
pull-requests: read
1416

1517
jobs:
1618
cleanup_stale_branches:
@@ -19,16 +21,15 @@ jobs:
1921
runs-on: ubuntu-latest
2022
steps:
2123
- name: Cleanup Stale Branches
22-
uses: crazy-matt/manage-stale-branches@c1b2156178222eaf8bc7f8a4bf7084595b3e8968
24+
uses: fpicalausa/remove-stale-branches@7c4f2afe88a36c0f9114cd958380979b9d7323fb
2325
with:
2426
github-token: '${{ secrets.GITHUB_TOKEN }}'
25-
stale-duration: 90d
26-
suggested-duration: 90d
27-
concurrency: 10
28-
dry-run: true
29-
archive-stale: false
30-
rate-limit-threshold: 20
31-
exclude-patterns: |
32-
master
33-
^((?!dependabot))
34-
^((?!release))
27+
days-before-branch-stale: 90
28+
days-before-branch-delete: 30
29+
operations-per-run: 10
30+
dry-run: false
31+
ignore-branches-with-open-prs: true
32+
stale-branch-message: |
33+
Dear @{author}, Your branch [{branchName}]({branchUrl}) has not been updated in the last {daysBeforeBranchStale} days and is marked as stale. It will be removed in {daysBeforeBranchDelete} days.
34+
If you want to keep this branch around, delete this comment or add new commits to this branch.
35+
exempt-branches-regex: '^(main|master|dependabot/.*|release/.*)$'

0 commit comments

Comments
 (0)