Skip to content

Commit 9244774

Browse files
committed
fix get_file_blame maintainer follow-ups
1 parent 1d99d41 commit 9244774

4 files changed

Lines changed: 896 additions & 183 deletions

File tree

README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1205,12 +1205,6 @@ The following sets of tools are available:
12051205
- `repo`: Repository name (string, required)
12061206
- `sha`: Commit SHA, branch name, or tag name (string, required)
12071207

1208-
- **get_file_blame** - Get file blame information
1209-
- `owner`: Repository owner (username or organization) (string, required)
1210-
- `path`: Path to the file in the repository (string, required)
1211-
- `ref`: Git reference (branch, tag, or commit SHA). Defaults to the repository's default branch (string, optional)
1212-
- `repo`: Repository name (string, required)
1213-
12141208
- **get_file_contents** - Get file or directory contents
12151209
- **Required OAuth Scopes**: `repo`
12161210
- `owner`: Repository owner (username or organization) (string, required)

pkg/github/__toolsnaps__/get_file_blame.snap

Lines changed: 38 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,53 @@
33
"readOnlyHint": true,
44
"title": "Get file blame information"
55
},
6-
"description": "Get git blame information for a file, showing who last modified each line",
6+
"description": "Get git blame information for a file, showing the commit that last modified each line. Ranges share commit metadata via the top-level 'commits' map keyed by SHA. Use 'start_line'/'end_line' to restrict the result to a window of the file, and 'page'/'perPage' to page through returned ranges. Matching ranges are capped at 1000; when the cap is hit 'truncated' is set to true and 'total_ranges' reports the pre-cap match count.",
77
"inputSchema": {
8-
"type": "object",
9-
"required": [
10-
"owner",
11-
"repo",
12-
"path"
13-
],
148
"properties": {
9+
"end_line": {
10+
"description": "Optional 1-based ending line of the window of interest. Must be \u003e= start_line when both are provided.",
11+
"minimum": 1,
12+
"type": "number"
13+
},
1514
"owner": {
16-
"type": "string",
17-
"description": "Repository owner (username or organization)"
15+
"description": "Repository owner (username or organization)",
16+
"type": "string"
17+
},
18+
"page": {
19+
"description": "Page number for pagination (min 1)",
20+
"minimum": 1,
21+
"type": "number"
1822
},
1923
"path": {
20-
"type": "string",
21-
"description": "Path to the file in the repository"
24+
"description": "Path to the file in the repository, relative to the repository root",
25+
"type": "string"
26+
},
27+
"perPage": {
28+
"description": "Results per page for pagination (min 1, max 100)",
29+
"maximum": 100,
30+
"minimum": 1,
31+
"type": "number"
2232
},
2333
"ref": {
24-
"type": "string",
25-
"description": "Git reference (branch, tag, or commit SHA). Defaults to the repository's default branch"
34+
"description": "Git reference (branch, tag, or commit SHA). Defaults to the repository's default branch (HEAD).",
35+
"type": "string"
2636
},
2737
"repo": {
28-
"type": "string",
29-
"description": "Repository name"
38+
"description": "Repository name",
39+
"type": "string"
40+
},
41+
"start_line": {
42+
"description": "Optional 1-based starting line of the window of interest. Only ranges overlapping [start_line, end_line] are returned, clamped to the window.",
43+
"minimum": 1,
44+
"type": "number"
3045
}
31-
}
46+
},
47+
"required": [
48+
"owner",
49+
"repo",
50+
"path"
51+
],
52+
"type": "object"
3253
},
3354
"name": "get_file_blame"
34-
}
55+
}

0 commit comments

Comments
 (0)