-
Notifications
You must be signed in to change notification settings - Fork 422
chore(repo): add commit message generator with clerk-specific scopes #7546
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
Conversation
Why: Added a commit message generator command to provide rich context in commit messages that can be used by LLMs in the future. Also added a rule to always read commit messages when provided a SHA for additional context.
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughThe change introduces a new commit message generator documentation file that specifies repository-specific configuration for commit scopes, valid types, flags, and the required message format, along with processing workflow and classification guidelines. Additionally, the global documentation is expanded with new bullet points across multiple sections including Core Commands, Key Directories, and Development Workflow, with minor formatting adjustments to preserve structure. 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
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.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In @.cursor/commands/cmt.md:
- Around line 42-60: Add explicit language specifiers to every fenced code block
in .cursor/commands/cmt.md (the blocks showing examples like "type(scope):
description", "type: description", the WRONG FORMATS block with "docs:
description" / "scope: description", and the "If working with docs:" example
block). For each triple-backtick block (including the examples at the mentioned
lines), change the fence to include a language token such as text (e.g.,
```text) so MD040 is satisfied and the literal commit-message examples render
correctly; ensure you apply the same `text` specifier to all remaining example
blocks referenced (lines 42, 49, 56, 83, 98, 114, 123, 138, 145, 152).
- Line 161: Fix the missing space after the colon in the inline sentence by
changing the string "Important:Do not add unnecessary new lines or paragraphs to
sentences. Let the editor wrap lines as needed." to "Important: Do not add
unnecessary new lines or paragraphs to sentences. Let the editor wrap lines as
needed." — update the exact line content (the "Important:Do not add..." string)
without adding extra newlines or paragraph breaks.
🧹 Nitpick comments (2)
.cursor/commands/cmt.md (2)
40-60: Use proper heading syntax instead of emphasis formatting.Line 40 uses
**CRITICAL**emphasis in a way that reads as a section heading. Per markdown linting standards, this should be a proper heading using###or similar.✏️ Suggested formatting change
-**CRITICAL: Type is MANDATORY and ALWAYS comes FIRST** +### CRITICAL: Type is MANDATORY and ALWAYS comes FIRST
112-112: Consider hyphenating compound adjective.Line 112 uses "limited context" as a compound adjective modifying the implicit noun phrase. Per grammar conventions, this may benefit from hyphenation for clarity:
"limited-context".✏️ Proposed change
-**Low impact or limited context:** +**Low impact or limited-context:**
📜 Review details
Configuration used: Repository YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (2)
.cursor/commands/cmt.md.cursor/rules/global.mdc
🧰 Additional context used
🪛 LanguageTool
.cursor/commands/cmt.md
[uncategorized] ~112-~112: If this is a compound adjective that modifies the following noun, use a hyphen.
Context: ...e work, related issues, caveats] **Low impact or limited context:** type(scope):...
(EN_COMPOUND_ADJECTIVE_INTERNAL)
🪛 markdownlint-cli2 (0.18.1)
.cursor/commands/cmt.md
40-40: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
42-42: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
49-49: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
56-56: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
83-83: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
98-98: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
114-114: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
123-123: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
138-138: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
145-145: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
152-152: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
⏰ 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). (28)
- GitHub Check: Unit Tests (shared, clerk-js, RQ)
- GitHub Check: Unit Tests (**)
- GitHub Check: Static analysis
- GitHub Check: Integration Tests (localhost, chrome)
- GitHub Check: Integration Tests (tanstack-react-start, chrome)
- GitHub Check: Integration Tests (machine, chrome, RQ)
- GitHub Check: Integration Tests (nextjs, chrome, 16, RQ)
- GitHub Check: Integration Tests (custom, chrome)
- GitHub Check: Integration Tests (nextjs, chrome, 15)
- GitHub Check: Integration Tests (quickstart, chrome, 16)
- GitHub Check: Integration Tests (billing, chrome, RQ)
- GitHub Check: Integration Tests (nextjs, chrome, 16)
- GitHub Check: Integration Tests (nuxt, chrome)
- GitHub Check: Integration Tests (billing, chrome)
- GitHub Check: Integration Tests (quickstart, chrome, 15)
- GitHub Check: Integration Tests (react-router, chrome)
- GitHub Check: Integration Tests (handshake, chrome)
- GitHub Check: Integration Tests (vue, chrome)
- GitHub Check: Integration Tests (machine, chrome)
- GitHub Check: Integration Tests (astro, chrome)
- GitHub Check: Integration Tests (handshake:staging, chrome)
- GitHub Check: Integration Tests (ap-flows, chrome)
- GitHub Check: Integration Tests (sessions, chrome)
- GitHub Check: Integration Tests (sessions:staging, chrome)
- GitHub Check: Integration Tests (express, chrome)
- GitHub Check: Integration Tests (generic, chrome)
- GitHub Check: semgrep-cloud-platform/scan
- GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (1)
.cursor/rules/global.mdc (1)
2-6: Documentation enhancements are clear and aligned with PR objectives.The additions to core commands, key directories, and development workflow provide helpful context. The SHA context rule at line 44 directly supports the commit message generator feature introduced in this PR.
Also applies to: 9-44
| ``` | ||
| type(scope): description ← CORRECT: type first, scope optional | ||
| type: description ← CORRECT: type without scope | ||
| ``` | ||
|
|
||
| **WRONG FORMATS:** | ||
|
|
||
| ``` | ||
| docs: description ← WRONG: "docs" is a SCOPE, not a type! | ||
| scope: description ← WRONG: missing type! | ||
| ``` | ||
|
|
||
| **If working with docs:** | ||
|
|
||
| ``` | ||
| feat(docs): add new guide ← CORRECT | ||
| chore(docs): update readme ← CORRECT | ||
| docs: something ← WRONG | ||
| ``` |
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.
🛠️ Refactor suggestion | 🟠 Major
Add language specifiers to all fenced code blocks.
Markdown linting standards (MD040) require language specifiers on fenced code blocks for syntax highlighting and clarity. This improves readability for users viewing the file in markdown renderers.
✏️ Add language specifiers to code blocks
Lines 42, 49, 56, 83, 98, 114, 123, 138, 145, 152 need language specifiers. Since these are example commit messages/formats, use `text` or leave generic:
-\`\`\`
+\`\`\`text
type(scope): description ← CORRECT: type first, scope optional
type: description ← CORRECT: type without scope
-\`\`\`
+\`\`\`textApply the same pattern to all remaining code blocks (especially lines 49, 56, 83, 98, 114, 123, 138, 145, 152).
Alternatively, if the blocks are meant to be copied literally (no specific language), use ```text or ```diff as appropriate for the content type.
Also applies to: 83-150
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)
42-42: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
49-49: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
56-56: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🤖 Prompt for AI Agents
In @.cursor/commands/cmt.md around lines 42 - 60, Add explicit language
specifiers to every fenced code block in .cursor/commands/cmt.md (the blocks
showing examples like "type(scope): description", "type: description", the WRONG
FORMATS block with "docs: description" / "scope: description", and the "If
working with docs:" example block). For each triple-backtick block (including
the examples at the mentioned lines), change the fence to include a language
token such as text (e.g., ```text) so MD040 is satisfied and the literal
commit-message examples render correctly; ensure you apply the same `text`
specifier to all remaining example blocks referenced (lines 42, 49, 56, 83, 98,
114, 123, 138, 145, 152).
|
|
||
| ## Remember | ||
|
|
||
| - Important:Do not add unnecessary new lines or paragraphs to sentences. Let the editor wrap lines as needed. |
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.
Fix spacing in inline formatting.
Line 161 has a missing space after the colon: "Important:Do" should be "Important: Do".
✏️ Proposed fix
-- Important:Do not add unnecessary new lines or paragraphs to sentences. Let the editor wrap lines as needed.
+- Important: Do not add unnecessary new lines or paragraphs to sentences. Let the editor wrap lines as needed.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - Important:Do not add unnecessary new lines or paragraphs to sentences. Let the editor wrap lines as needed. | |
| - Important: Do not add unnecessary new lines or paragraphs to sentences. Let the editor wrap lines as needed. |
🤖 Prompt for AI Agents
In @.cursor/commands/cmt.md at line 161, Fix the missing space after the colon
in the inline sentence by changing the string "Important:Do not add unnecessary
new lines or paragraphs to sentences. Let the editor wrap lines as needed." to
"Important: Do not add unnecessary new lines or paragraphs to sentences. Let the
editor wrap lines as needed." — update the exact line content (the "Important:Do
not add..." string) without adding extra newlines or paragraph breaks.
@clerk/agent-toolkit
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/dev-cli
@clerk/expo
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
| - **Packages:** agent-toolkit, astro, backend, chrome-extension, clerk-js, dev-cli, elements, expo, expo-passkeys, express, fastify, localizations, nextjs, nuxt, react, react-router, remix, shared, tanstack-react-start, testing, themes, types, ui, upgrade, vue | ||
| - **Other:** docs, repo, release, e2e, \* |
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.
We should ask the agent to derive this from a source of truth instead of also having this list to maintain
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.
I noticed that it takes a few more seconds each time to go through the commitlint config and all package.json files
This acts as a "cache" - if we add a new package, commitlint will most likely fail so we/the llm will update the list accordingly - maybe this is something we can add to the prompt as an explicit instruction?
Why:
Added a commit message generator command to provide rich context in commit messages that can be used by LLMs in the future. Also added a rule to always read commit messages when provided a SHA for additional context.
Description
Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.