[📒] Commit Message Checker: 76-add-piece-icon-in-logs #90
Workflow file for this run
This file contains 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: '[📒] Commit Message Checker' | |
run-name: '[📒] Commit Message Checker: ${{ github.head_ref }}' | |
on: | |
pull_request: | |
types: | |
- opened | |
- edited | |
- reopened | |
- synchronize | |
jobs: | |
check-commit-message: | |
name: Check Commit Messages | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get PR Commits | |
id: 'get-pr-commits' | |
uses: tim-actions/get-pr-commits@master | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Check Subject Line Length | |
uses: tim-actions/[email protected] | |
with: | |
commits: ${{ steps.get-pr-commits.outputs.commits }} | |
pattern: '^.{0,75}(\n.*)*$' | |
error: 'Subject too long (max 75)' | |
- name: Check Syntax | |
uses: tim-actions/[email protected] | |
with: | |
commits: ${{ steps.get-pr-commits.outputs.commits }} | |
pattern: '\[#\d+\] [a-zA-Z]+|\[trivial\] [a-zA-Z]+|Merge [a-zA-Z]+' | |
error: 'Commit messages must start with an issue number. For example "[#21] MESSAGE" or "[trivial] MESSAGE" or "Merge MESSAGE".' | |
one_pass_all_pass: 'false' |