Skip to content

Commit 7456b23

Browse files
authored
fix(ci): escape single quote from pr title, and forbid generic one (#792)
1 parent 4e667e8 commit 7456b23

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/check-pull-request.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,13 @@ jobs:
1717
check-latest: true
1818
cache: "pnpm"
1919
- run: pnpm install
20-
- run: echo '${{ github.event.pull_request.title }}' | pnpm commitlint
20+
- name: Check title
21+
run: |
22+
title="${{ github.event.pull_request.title }}"
23+
title_escaped=${title//\'/\'}
24+
if [ "$title" == "feat: update generated APIs" ]; then
25+
echo "Invalid title."
26+
exit 1
27+
else
28+
echo "$title_escaped" | pnpm commitlint
29+
fi

0 commit comments

Comments
 (0)