Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(ci): check on branch name #3082

Merged
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/PULL_REQUEST_NAME_CHECK_ON_PR.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
on:
pull_request:
branches:
- main
- master
mathias-vandaele marked this conversation as resolved.
Show resolved Hide resolved
types: [opened, synchronize, reopened, edited]

jobs:
check-pull-request-name:
runs-on: ubuntu-latest
steps:
- name: Extract pull request name
id: extract_pr
run: echo "${{ github.event.pull_request.title }}"
- name: Check if pull request name follows conventional commit regex
run: |
PR_REGEX='^(feat|fix|docs|style|refactor|perf|test|chore)\(?.+\)?: .+$'
if [[ "${{ github.event.pull_request.title }}" =~ $PR_REGEX ]]; then
echo "Pull request name follows the conventional commit format."
else
echo "Pull request does not follow the conventional commit format."
exit 1
fi
Loading