File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33on :
44 push :
5- branches : [main]
5+ branches : [main, develop ]
66 pull_request :
7- branches : [main]
7+ branches : [main, develop ]
88
99jobs :
1010 lint :
9898 release-check :
9999 name : Release Check
100100 runs-on : ubuntu-latest
101- if : github.event_name == 'pull_request'
101+ # Only relevant for release PRs (develop -> main); skip on PRs into develop.
102+ if : github.event_name == 'pull_request' && github.base_ref == 'main'
102103 steps :
103104 - uses : actions/checkout@v4
104105 with :
Original file line number Diff line number Diff line change 44 pull_request_target :
55 types : [opened, reopened, synchronize]
66
7+ permissions :
8+ pull-requests : write
9+ contents : read
10+
711jobs :
8- # Block any PR to main that doesn't come from develop
12+ # Block any PR to main that doesn't come from develop (non-fork branches only;
13+ # forks are handled by redirect-forks below to avoid a duplicate message).
914 require-develop-to-main :
1015 runs-on : ubuntu-latest
11- if : github.event.pull_request.base.ref == 'main' && github.event.pull_request.head.ref != 'develop'
16+ if : github.event.pull_request.base.ref == 'main' && github.event.pull_request.head.ref != 'develop' && !github.event.pull_request.head.repo.fork
1217 steps :
1318 - name : Block non-develop PRs to main
1419 run : |
You can’t perform that action at this time.
0 commit comments