Skip to content

Commit

Permalink
新增github action规范PR格式优化
Browse files Browse the repository at this point in the history
  • Loading branch information
LidolLxf committed Jun 27, 2024
1 parent 2e9f7f4 commit d966104
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/pr-lint.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: pr-lint
on: [push, pull_request]
on: [pull_request]
jobs:
PR-format-check:
runs-on: ubuntu-latest
Expand All @@ -9,6 +9,8 @@ jobs:
title="${{ github.event.pull_request.title }}"
pattern="^(feat|fix|docs|style|refactor|perf|test|chore|revert|build|ci): .*"
if [[ ! $title =~ $pattern ]]; then
echo "PR title does not match naming convention. Example: 'feat: 添加新功能'"
echo "PR title does not match naming convention. Example: 'feat: 添加新功能'.\
You can refer to this address for details:\
https://github.com/TencentBlueKing/bk-bcs/blob/master/docs/specification/commit-spec.md"
exit 1
fi

0 comments on commit d966104

Please sign in to comment.