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 8
8
live_protection_job :
9
9
name : Create comment
10
10
runs-on : ubuntu-latest
11
- permissions :
12
- pull-requests : write
13
11
14
12
steps :
15
13
- name : Harden Runner
19
17
20
18
- uses : actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
21
19
env :
22
- SHOULD_COMMENT : ${{ github.base_ref == 'live' && github.head_ref != 'main' }}
20
+ LIVE_BASE : ${{ github.base_ref == 'live' && github.head_ref != 'main' }}
23
21
with :
24
22
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')
32
25
}
You can’t perform that action at this time.
0 commit comments