-
Notifications
You must be signed in to change notification settings - Fork 1
ci: Replace regex commit checker with commitlint. #234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -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" | ||||||
| cache: "npm" | ||||||
|
|
||||||
| - name: "🛠 Install commitlint" | ||||||
| run: npm ci | ||||||
|
||||||
| run: npm ci | |
| run: npm ci --ignore-scripts |
Copilot
AI
Mar 24, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To ensure this uses the repo’s installed/pinned commitlint (and fails if dependencies weren’t installed), consider adding --no-install to the npx commitlint ... invocation. This avoids npx falling back to downloading packages if the local install step changes in the future.
| run: npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose | |
| run: npx --no-install commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actions/setup-nodeis configured withnode-version: "20", butpackage.jsonrequires Node>=20.17. If GitHub’s latest 20.x ever resolves below 20.17,npm ciwill fail due to the engine check. Consider pinning to20.17(or20.17.x) here to match the repo’s declared minimum and make CI deterministic.