File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Auto-rebase open PRs when main branch is updated
2+ # This prevents merge conflicts from piling up across PRs
3+ name : Auto Rebase PRs
4+
5+ on :
6+ # Trigger when main is updated in any repo
7+ push :
8+ branches : [main, master]
9+ # Allow manual trigger
10+ workflow_dispatch :
11+ inputs :
12+ pr_number :
13+ description : ' Specific PR number to rebase (optional)'
14+ required : false
15+
16+ jobs :
17+ rebase :
18+ runs-on : ubuntu-latest
19+ # Don't run on the .github repo itself
20+ if : github.repository != 'happyvertical/.github'
21+ steps :
22+ - name : Checkout
23+ uses : actions/checkout@v4
24+ with :
25+ fetch-depth : 0
26+ token : ${{ secrets.GITHUB_TOKEN }}
27+
28+ - name : Rebase open PRs
29+ uses : peter-evans/rebase@v3
30+ with :
31+ token : ${{ secrets.GITHUB_TOKEN }}
32+ # Only rebase PRs that are behind main
33+ rebase-all : false
34+ # Exclude draft PRs
35+ exclude-drafts : true
36+ # Exclude PRs with 'no-rebase' label
37+ exclude-labels : no-rebase
You can’t perform that action at this time.
0 commit comments