Skip to content

refactor: replace SupportedMonitorConfig with SupportedLoggingConfig #22

refactor: replace SupportedMonitorConfig with SupportedLoggingConfig

refactor: replace SupportedMonitorConfig with SupportedLoggingConfig #22

Workflow file for this run

name: Git Lint
on:
pull_request:
branches: [ main, dev, develop ]
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Validate Branch Name
run: |
BRANCH="${{ github.head_ref }}"
echo "πŸ” Checking branch name: $BRANCH"
REGEX="^(feature|refactor|fix|chore|build|style|docs|release)/.+$"
if [[ ! "$BRANCH" =~ $REGEX ]]; then
echo "❌ Invalid branch name: '$BRANCH'"
echo "πŸ’‘ Use: feature/name, fix/bug-name, etc."
exit 1
fi
echo "βœ… Branch name is valid."
- name: Validate Commit Messages
run: |
echo "πŸ” Checking commit messages in PR..."
COMMITS=$(git log --no-merges --pretty=%B origin/${{ github.base_ref }}..HEAD)
REGEX="^(feat|fix|chore|refactor|test|docs|style|ci|perf|build|revert)(\(.+\))?:\ .+"
CYRILLIC_REGEX='[Π°-яА-ЯёЁіІїЇєЄ]'
while IFS= read -r MSG; do
if [ -z "$MSG" ]; then continue; fi
echo "πŸ’¬ Testing: $MSG"
if [[ ! "$MSG" =~ $REGEX ]]; then
echo "❌ Invalid format: '$MSG'"
echo "πŸ’‘ Use: feat(scope): description"
exit 1
fi
if [[ "$MSG" =~ $CYRILLIC_REGEX ]]; then
echo "❌ Cyrillic detected in: '$MSG'"
echo "πŸ’‘ Use English only for commit messages."
exit 1
fi
done <<< "$COMMITS"
echo "βœ… All commit messages are valid."