File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,8 @@ permissions:
4
4
contents : read
5
5
6
6
jobs :
7
- comment :
7
+ live_protection_job :
8
+ name : Prevent unintended merge to live
8
9
runs-on : ubuntu-latest
9
10
steps :
10
11
- name : Harden Runner
@@ -14,14 +15,14 @@ jobs:
14
15
15
16
- uses : actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
16
17
env :
17
- SHOULD_COMMENT : ${{ github.base_ref == 'refs/heads/ live' && !( github.event.issue.user.login == 'cxwtool' || github. head_ref == 'refs/heads/ main') }}
18
+ SHOULD_COMMENT : ${{ github.base_ref == 'live' && github.head_ref != ' main' }}
18
19
with :
19
20
script : |
20
21
if (process.env.SHOULD_COMMENT == 'true') {
21
22
github.issues.createComment({
22
23
issue_number: context.issue.number,
23
24
owner: context.repo.owner,
24
25
repo: context.repo.repo,
25
- body: 'It looks like this pull request may have been opened on the `live` branch by mistake. In general, PRs should target the `main` branch.'
26
+ body: 'It looks like this pull request was opened on the `live` branch by mistake. In general, PRs should target the `main` branch.'
26
27
})
27
28
}
You can’t perform that action at this time.
0 commit comments