refactor: replace SupportedMonitorConfig with SupportedLoggingConfig #23
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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." |