#87 implemented bulk cash-flow-statement-growth endpoint. #159
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: Check Commit Messages | |
| on: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| jobs: | |
| check-commit-messages: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Fetch base branch | |
| run: git fetch origin master | |
| - name: Get commit messages | |
| run: | | |
| COMMITS=$(git log origin/master..HEAD --pretty=format:"%s") | |
| echo "Commit messages:" | |
| echo "$COMMITS" | |
| echo "$COMMITS" > commits.txt | |
| - name: Validate commit messages | |
| run: | | |
| VALID_MESSAGES=$(grep -v '^Merge ' commits.txt) | |
| INVALID=$(echo "$VALID_MESSAGES" | grep -vE '^#[[:digit:]]+[[:space:]]{1}' || true) | |
| if [[ -n "$INVALID" ]]; then | |
| echo "🔴 The following commit messages are invalid:" | |
| echo "$INVALID" | |
| exit 1 | |
| else | |
| echo "🟢 All commit messages are valid." | |
| fi |