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:
44 contents : read
55
66jobs :
7- comment :
7+ live_protection_job :
8+ name : Prevent unintended merge to live
89 runs-on : ubuntu-latest
910 steps :
1011 - name : Harden Runner
@@ -14,14 +15,14 @@ jobs:
1415
1516 - uses : actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea
1617 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' }}
1819 with :
1920 script : |
2021 if (process.env.SHOULD_COMMENT == 'true') {
2122 github.issues.createComment({
2223 issue_number: context.issue.number,
2324 owner: context.repo.owner,
2425 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.'
2627 })
2728 }
You can’t perform that action at this time.
0 commit comments