Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
16 changes: 16 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## What does this PR do?

<!-- Brief description of the changes -->

## Type of change

- [ ] Feature
- [ ] Bug fix
- [ ] Chore / config
- [ ] Hotfix

## Checklist

- [ ] My branch follows the naming convention (`feature/`, `fix/`, `chore/`, `hotfix/`)
- [ ] My commit messages follow the conventional commits format
- [ ] CI checks pass
37 changes: 37 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,43 @@ on:
branches: [main]

jobs:
validate:
name: Validate branch & commits
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: Check branch name
run: |
BRANCH="${{ github.head_ref }}"
if ! echo "$BRANCH" | grep -qE '^(feature|fix|chore|hotfix)/.+'; then
echo "Branch name '$BRANCH' does not follow the naming convention."
echo "Expected: feature/, fix/, chore/, or hotfix/ prefix"
exit 1
fi

- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Check commit messages
run: |
COMMITS=$(git log origin/${{ github.base_ref }}..HEAD --format="%s" --no-merges)
PATTERN="^(feat|fix|chore|hotfix|docs|refactor|test|style|ci)(\(.+\))?: .+"
FAILED=0
while IFS= read -r msg; do
if [ -z "$msg" ]; then continue; fi
if ! echo "$msg" | grep -qE "$PATTERN"; then
echo "Invalid commit message: '$msg'"
FAILED=1
fi
done <<< "$COMMITS"
if [ $FAILED -eq 1 ]; then
echo ""
echo "Commit messages must follow: type(scope): description"
echo "Valid types: feat, fix, chore, hotfix, docs, refactor, test, style, ci"
exit 1
fi

web:
name: Web
runs-on: ubuntu-latest
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.vscode/
Loading