ci: introduce conventional commits & commitlint#1184
Conversation
|
Warning Rate limit exceeded@ken-matsui has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 17 minutes and 58 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (1)
WalkthroughA new GitHub Actions workflow is added to automate commit message linting on push and pull request events. The workflow installs necessary dependencies, checks out the repository, prints relevant tool versions, and runs commitlint to validate commit messages according to the conventional commit standard. The contributing guide is updated to simplify commit message instructions and align PR guidelines with Conventional Commits. Changes
Sequence Diagram(s)sequenceDiagram
participant GitHub
participant Workflow
participant Runner
participant CommitLint
GitHub->>Workflow: Trigger on push or pull_request
Workflow->>Runner: Start job (commitlint)
Runner->>Runner: Checkout repository
Runner->>Runner: Set up Node.js
Runner->>Runner: Install commitlint dependencies
Runner->>Runner: Print versions (git, node, npm, commitlint)
alt push event
Runner->>CommitLint: Lint last commit message
else pull_request event
Runner->>CommitLint: Lint all PR commit messages
end
CommitLint-->>Runner: Return lint results
Runner-->>Workflow: Complete job
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
.github/workflows/commitlint.yml (1)
1-4: Workflow name is generic.The top-level name
CIis broad; most projects already have a CI workflow for tests/builds. Renaming to something likeCommit Lintavoids confusion in the Actions tab.-name: CI +name: Commit Lint
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
CONTRIBUTING.md (2)
120-123: Spell-out what “follow Conventional Commits” actually meansA single-line reference is concise, but newcomers may not click through.
Consider adding a one-sentence example (feat(parser): support JSON5) or a
bullet list of the minimum rules enforced by commitlint (type + scope, lowercase
type, no trailing period, ≤ 72 chars, etc.). This keeps the doc self-contained
while still deferring to the full spec.
126-128: “Description: Follow Conventional Commits” is misleadingThe Conventional Commits spec governs the header (
<type>(<scope>): <subject>)
and the optional body/footer of commits, not PR descriptions.
Stating that the PR “Description” must also follow the spec can confuse
contributors (e.g., do they need to write aBREAKING CHANGE:footer in the PR
body?).Proposed tweak:
-1. **Title**: Follow Conventional Commits. -2. **Description**: Follow Conventional Commits. +1. **Title**: Use a Conventional Commit–style header (e.g., `feat(ui): add dark mode`). +2. **Description**: Provide context, motivation, and links; no strict format required.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
.github/workflows/commitlint.yml(1 hunks)CONTRIBUTING.md(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- .github/workflows/commitlint.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (12)
- GitHub Check: build & test (GCC 13)
- GitHub Check: build & test (Apple Clang - macOS 14)
- GitHub Check: build & test (Clang 16)
- GitHub Check: build & test (Apple Clang - macOS 15)
- GitHub Check: build & test (GCC 12)
- GitHub Check: build & test (Clang 20)
- GitHub Check: build & test (Apple Clang - macOS 13)
- GitHub Check: build & test (GCC 14)
- GitHub Check: create
- GitHub Check: build & test (Clang 17)
- GitHub Check: build & test (Clang 19)
- GitHub Check: analyze (c-cpp)
Introduce conventional commits & commitlint for automated commit message checks. No one could understand the previous rule (to be fair, I also got confused sometimes). This reduces the maintainer's workload.
Summary by CodeRabbit