Skip to content

feat(app): let the caller supply theme and feature config sources #1288

feat(app): let the caller supply theme and feature config sources

feat(app): let the caller supply theme and feature config sources #1288

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 }}"
REGEX="^(feat|feature|refactor|fix|chore|build|style|docs|release)/.+$"
if [[ ! "$BRANCH" =~ $REGEX ]]; then
echo "Invalid branch name: '$BRANCH'"
exit 1
fi
- name: Validate Commit Messages
run: |
COMMITS_FULL=$(git log --no-merges --format=%B origin/${{ github.base_ref }}..HEAD)
COMMITS_SUBJECTS=$(git log --no-merges --format=%s origin/${{ github.base_ref }}..HEAD)
if echo "$COMMITS_FULL" | grep -qP '\p{Cyrillic}'; then
echo "Cyrillic characters detected in commits."
exit 1
fi
# A capitalized first letter in the description is allowed (e.g. "fix: WebRTC ...").
REGEX="^(feat|fix|chore|refactor|test|docs|style|ci|perf|build|revert)(\([^)]+\))?: .+$"
# Legacy commits that predate the current convention and are already merged into
# shared history. Rewriting them would rewrite hundreds of commits across dozens of
# branches, so they are exempted by exact subject instead.
ALLOWLIST=(
"fix fix changing info icon color (#836)"
)
while IFS= read -r SUBJECT; do
if [ -z "$SUBJECT" ]; then continue; fi
for ALLOWED in "${ALLOWLIST[@]}"; do
if [ "$SUBJECT" = "$ALLOWED" ]; then continue 2; fi
done
if [[ ! "$SUBJECT" =~ $REGEX ]]; then
echo "Invalid commit message format: '$SUBJECT'"
exit 1
fi
done <<< "$COMMITS_SUBJECTS"