Skip to content

Commit 3993520

Browse files
committed
docs: update usage examples and feature descriptions
- update commit message examples to use scoped Conventional Commits - clarify release notes generation usage in README - enhance feature list to highlight scope support, contributor sorting, and security improvements
1 parent 22eaa72 commit 3993520

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ Use Git tools in CodeCompanion chat:
105105
```
106106
@{git_edit} stage --files ["src/main.lua", "README.md"]
107107
@{git_edit} unstage --files ["src/main.lua"]
108-
@{git_edit} commit --commit_message "feat: add new feature"
108+
@{git_edit} commit --commit_message "feat(api): add new feature"
109109
@{git_edit} commit # Auto-generate AI commit message
110110
@{git_edit} create_branch --branch_name "feature/new-ui" --checkout true
111111
@{git_edit} checkout --target "main"
@@ -149,7 +149,7 @@ Use a comprehensive Git assistant that combines read and write operations:
149149
@{git_read} status # Check repository status
150150
@{git_edit} stage --files ["file1.txt", "file2.txt"] # Stage files
151151
/gitcommit # Select commit and insert its content for reference
152-
@{git_edit} commit --commit_message "feat: add new feature" # Commit
152+
@{git_edit} commit --commit_message "feat(api): add new feature" # Commit
153153
@{git_edit} push --remote "origin" --branch "main" # Push changes
154154
@{git_read} generate_release_notes # Generate release notes between latest tags
155155
```
@@ -231,14 +231,14 @@ gitcommit.exports.git_tool.stage({"file1.txt", "file2.txt"})
231231
-- Create and checkout branch
232232
gitcommit.exports.git_tool.create_branch("feature/new-feature", true)
233233

234-
-- Generate release notes
234+
-- Generate release notes between specific tags (with all parameters)
235235
local success, notes, user_msg, llm_msg = gitcommit.exports.git_tool.generate_release_notes("v1.0.0", "v1.1.0", "markdown")
236236
if success then
237237
print("Release notes:", notes)
238238
end
239239

240-
-- Generate release notes between specific tags
241-
local success, notes = gitcommit.exports.git_tool.generate_release_notes("v1.0.0", "v1.1.0", "markdown")
240+
-- Generate release notes (auto-detect latest two tags)
241+
local success, notes = gitcommit.exports.git_tool.generate_release_notes()
242242
```
243243

244244
## 📚 Documentation

doc/codecompanion-gitcommit.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ Use Git tools in CodeCompanion chat: >
138138
@{git_read} status # Check repository status
139139
@{git_edit} stage --files ["file.txt"] # Stage files
140140
/gitcommit # Generate commit message
141-
@{git_edit} commit --commit_message "feat: add feature" # Commit
141+
@{git_edit} commit --commit_message "feat(api): add feature" # Commit
142142
@{git_edit} push --remote "origin" --branch "main" # Push
143143
@{git_read} generate_release_notes # Generate release notes
144144
<
@@ -201,7 +201,7 @@ Examples: >
201201
@{git_read} log --count 5
202202
@{git_edit} stage --files ["src/main.lua"]
203203
@{git_edit} create_branch --branch_name "feature/new"
204-
@{git_edit} commit --commit_message "feat: add new feature"
204+
@{git_edit} commit --commit_message "feat(api): add new feature"
205205
@{git_bot} Please help me create a new branch and commit current changes
206206
<
207207

@@ -218,10 +218,12 @@ Usage examples: >
218218

219219
Features:
220220
• Automatic tag detection (uses latest and second-latest if not specified)
221-
• Conventional Commits categorization (features, fixes, other changes)
221+
• Enhanced Conventional Commits support (supports scope format like "feat(api):")
222+
• Smart commit categorization (features, fixes, other changes)
222223
• Multiple output formats: markdown (default), plain, json
223-
• Contributors listing with commit counts
224-
• Chronological commit ordering
224+
• Contributors listing with commit counts (sorted by contribution)
225+
• Secure parameter handling with proper escaping
226+
• Performance optimized string operations
225227

226228
Safety features:
227229
• Read-only operations require no confirmation

0 commit comments

Comments
 (0)