Skip to content

Commit cbed90f

Browse files
committed
Make pattern for issue number more strict
1 parent 6c46a37 commit cbed90f

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

.github/workflows/tests-pr.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
path: pr_number.txt
2323

2424
check_title_format:
25-
name: PR title must not start with "Fix for issue <number>"
25+
name: PR title must not contain "issue <number>"
2626
if: github.actor != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name != 'JabRef/jabref'
2727
runs-on: ubuntu-latest
2828
steps:
@@ -36,13 +36,8 @@ jobs:
3636
TITLE=$(gh pr view "${{ github.event.number }}" --json title --template '{{.title}}')
3737
echo "Title: $TITLE"
3838
39-
if echo "$TITLE" | grep -Eiq '^Fix for issue #?[0-9]+'; then
40-
echo "❌ Title starts with 'Fix for issue <number>' — not allowed."
41-
exit 1
42-
fi
43-
44-
if echo "$TITLE" | grep -Eiq '^Fixed the issue'; then
45-
echo "❌ Title starts with 'Fixed the issue' — not allowed."
39+
if echo "$TITLE" | grep -Eiq 'issue ?#?[0-9]+.+'; then
40+
echo "❌ Title contains 'issue <number>' — not allowed."
4641
exit 1
4742
fi
4843

0 commit comments

Comments
 (0)