-
Notifications
You must be signed in to change notification settings - Fork 0
30 lines (27 loc) · 935 Bytes
/
stale-branches.yml
File metadata and controls
30 lines (27 loc) · 935 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Marks stale, then deletes, stale branches. See:
# https://github.com/marketplace/actions/remove-stale-branches
#
# Part of an org-wide rollout. Timing is staggered across repos
# to avoid GitHub API rate limits (9:00-9:59 AM ET window).
name: 'Stale Branches'
on:
schedule:
# Runs at 9:04 AM Eastern, Monday-Friday (14:04 UTC)
- cron: '4 14 * * 1-5'
workflow_dispatch: # Allow manual trigger
permissions:
contents: write
pull-requests: read
jobs:
remove-stale-branches:
name: Stale Branches
runs-on: ubuntu-latest
steps:
- uses: fpicalausa/remove-stale-branches@v2.4.0
with:
days-before-branch-stale: 30
days-before-branch-delete: 7
# Only target conventional branch prefixes (release/* excluded - protected by repo rules)
restrict-branches-regex: '^(feature|fix)/'
ignore-branches-with-open-prs: true
operations-per-run: 100