Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 14 additions & 17 deletions .github/workflows/check-commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,19 @@ jobs:
check-commit-messages:
runs-on: ubuntu-latest
steps:
- name: "📜 Check commit messages format"
uses: gsactions/commit-message-checker@v1
- name: "⏳ Checkout repository"
uses: actions/checkout@v4
with:
pattern: '^[^!]+: [A-Za-z]+.+ .+\.$'
flags: "gm"
error: "Commit subject line must match the following pattern: <scope>: <description>."
excludeTitle: "false"
excludeDescription: "true"
checkAllCommitMessages: "true"
accessToken: ${{ secrets.GITHUB_TOKEN }}
- name: "📜 Check commit messages length"
uses: gsactions/commit-message-checker@v1
fetch-depth: 0

- name: "🟢 Set up Node.js"
uses: actions/setup-node@v4
with:
pattern: "^[^#].{10,78}$"
error: "Commit subject line maximum line length of 78 characters is exceeded."
excludeTitle: "false"
excludeDescription: "true"
checkAllCommitMessages: "true"
accessToken: ${{ secrets.GITHUB_TOKEN }}
node-version: "20.17.x"
cache: "npm"

- name: "🛠 Install commitlint"
run: npm ci --ignore-scripts

- name: "📜 Validate commit messages"
run: npx --no-install commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
Loading