mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-01 18:57:24 +00:00
Validates pull requests aimed at master to follow established branch naming conventions
This commit is contained in:
1 parent
bd5113dbb8
commit
4a0f97f201
1 file changed
+20
@@ -0,0 +1,20 @@
|
||||
name: PR Source Branch Check
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
check-branch-name:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check source branch name
|
||||
run: |
|
||||
branch_name=${{ github.head_ref }}
|
||||
if ! [[ $branch_name =~ ^(feature|bugfix|hotfix|documentation|refactor|other)/ ]]; then
|
||||
echo "Error: Branch name '$branch_name' does not follow the naming convention."
|
||||
echo "It should start with one of: feature/, bugfix/, hotfix/, documentation/, refactor/, or other/"
|
||||
exit 1
|
||||
fi
|
||||
echo "Branch name '$branch_name' follows the correct naming convention."
|
||||
Reference in new issue
Block a user