Skip to content

Commit fdfeef7

Browse files
ci: add check for 'do not merge' in PR titles (#383)
1 parent caa24a0 commit fdfeef7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/semantic_pr_check.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,13 @@ jobs:
3939
Build
4040
tests
4141
Tests
42+
43+
- name: Check for "do not merge" in PR title
44+
if: ${{ github.event.pull_request.draft == false }}
45+
uses: actions/github-script@v6
46+
with:
47+
script: |
48+
const title = context.payload.pull_request.title.toLowerCase();
49+
if (title.includes('do not merge') || title.includes('do-not-merge')) {
50+
core.setFailed('PR title contains "do not merge" or "do-not-merge". Please remove this before merging.');
51+
}

0 commit comments

Comments
 (0)