Skip to content

Commit 95e7133

Browse files
committed
docs: update README with until parameter for all tools
Added until parameter documentation for: - get_file_churn - get_code_ownership - get_velocity_trends - get_collaboration_metrics - get_quality_metrics - get_conventional_commits All tools now support period comparisons with inclusive until dates. README now accurately reflects code capabilities.
1 parent 0e1c24b commit 95e7133

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ Files with most changes (indicates complexity or issues).
233233
**Parameters:**
234234
- `repo_path` (required): Path to git repository
235235
- `since` (required): Start date (YYYY-MM-DD)
236+
- `until` (optional): End date (YYYY-MM-DD), inclusive
236237
- `limit` (optional): Number of files, default 10
237238

238239
**Returns:**
@@ -294,6 +295,7 @@ Bus factor and knowledge distribution.
294295
**Parameters:**
295296
- `repo_path` (required): Path to git repository
296297
- `since` (required): Start date (YYYY-MM-DD)
298+
- `until` (optional): End date (YYYY-MM-DD), inclusive
297299

298300
**Returns:**
299301
```json
@@ -314,6 +316,7 @@ Track velocity over time.
314316
**Parameters:**
315317
- `repo_path` (required): Path to git repository
316318
- `since` (required): Start date (YYYY-MM-DD)
319+
- `until` (optional): End date (YYYY-MM-DD), inclusive
317320
- `interval` (optional): "week" or "month", default "week"
318321

319322
**Returns:**
@@ -333,6 +336,7 @@ Team interaction patterns.
333336
**Parameters:**
334337
- `repo_path` (required): Path to git repository
335338
- `since` (required): Start date (YYYY-MM-DD)
339+
- `until` (optional): End date (YYYY-MM-DD), inclusive
336340

337341
**Returns:**
338342
```json
@@ -351,6 +355,7 @@ Code quality indicators.
351355
**Parameters:**
352356
- `repo_path` (required): Path to git repository
353357
- `since` (required): Start date (YYYY-MM-DD)
358+
- `until` (optional): End date (YYYY-MM-DD), inclusive
354359

355360
**Returns:**
356361
```json
@@ -389,6 +394,7 @@ Analyze conventional commit usage and release patterns.
389394
**Parameters:**
390395
- `repo_path` (required): Path to git repository
391396
- `since` (required): Start date (YYYY-MM-DD)
397+
- `until` (optional): End date (YYYY-MM-DD), inclusive
392398

393399
**Returns:**
394400
```json

src/git-metrics.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
224224
properties: {
225225
repo_path: { type: "string", description: "Path to git repository" },
226226
since: { type: "string", description: "Start date (YYYY-MM-DD)" },
227+
until: { type: "string", description: "End date (YYYY-MM-DD), optional" },
227228
},
228229
required: ["repo_path", "since"],
229230
},

src/handlers.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,12 +366,15 @@ export function handleGetTechnicalDebt(args: any) {
366366
}
367367

368368
export function handleGetConventionalCommits(args: any) {
369-
const { repo_path, since } = args;
369+
const { repo_path, since, until } = args;
370370

371371
validateRepoPath(repo_path);
372372
validateDate(since, "since");
373+
if (until) validateDate(until, "until");
373374

374-
const cmd = `git log --since="${since}" --pretty=format:"%H|%s|%ad" --date=short`;
375+
let cmd = `git log --since="${since}"`;
376+
if (until) cmd += ` --until="${until} 23:59:59"`;
377+
cmd += ` --pretty=format:"%H|%s|%ad" --date=short`;
375378
const output = runGitCommand(repo_path, cmd);
376379
const lines = output.trim().split("\n").filter(l => l);
377380

0 commit comments

Comments
 (0)