File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change 88 live_protection_job :
99 name : Create comment
1010 runs-on : ubuntu-latest
11- permissions :
12- pull-requests : write
1311
1412 steps :
1513 - name : Harden Runner
1917
2018 - uses : actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
2119 env :
22- SHOULD_COMMENT : ${{ github.base_ref == 'live' && github.head_ref != 'main' }}
20+ LIVE_BASE : ${{ github.base_ref == 'live' && github.head_ref != 'main' }}
2321 with :
2422 script : |
25- if (process.env.SHOULD_COMMENT == 'true') {
26- github.rest.issues.createComment({
27- issue_number: context.issue.number,
28- owner: context.repo.owner,
29- repo: context.repo.repo,
30- body: 'It looks like this pull request was opened on the live branch by mistake. In general, PRs should target main.'
31- })
23+ if (process.env.LIVE_BASE == 'true') {
24+ core.setFailed('PR targets live branch')
3225 }
You can’t perform that action at this time.
0 commit comments