Skip to content

Commit 31a817f

Browse files
Promote get_file_blame out of insiders
Remove the file_blame feature flag so get_file_blame is registered in the repos toolset by default instead of only via insiders mode or an explicit opt-in. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 9a72d8d commit 31a817f

9 files changed

Lines changed: 18 additions & 45 deletions

‎README.md‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1487,6 +1487,17 @@ For negotiated supported protocol versions `2026-07-28` or newer, the consolidat
14871487
- `repo`: Repository name (string, required)
14881488
- `sha`: Commit SHA, branch name, or tag name (string, required)
14891489

1490+
- **get_file_blame** - Get file blame information
1491+
- **OAuth Challenge Scopes**: `repo`
1492+
- `after`: Cursor for pagination. Use the cursor from the previous response. (string, optional)
1493+
- `end_line`: Optional 1-based ending line of the window of interest. Must be >= start_line when both are provided. (number, optional)
1494+
- `owner`: Repository owner (username or organization) (string, required)
1495+
- `path`: Path to the file in the repository, relative to the repository root (string, required)
1496+
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
1497+
- `ref`: Git reference (branch, tag, or commit SHA). Defaults to the repository's default branch (HEAD). (string, optional)
1498+
- `repo`: Repository name (string, required)
1499+
- `start_line`: Optional 1-based starting line of the window of interest. Only ranges overlapping [start_line, end_line] are returned, clamped to the window. (number, optional)
1500+
14901501
- **get_file_contents** - Get file or directory contents
14911502
- **OAuth Challenge Scopes**: `repo`
14921503
- `fields`: Subset of fields to return for each entry when the path is a directory. If omitted, all fields are returned. Ignored when the path is a single file. Use this to reduce response size when listing directories and you only need specific fields, e.g. just 'name' and 'type'. (string[], optional)

‎docs/feature-flags.md‎

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -518,19 +518,6 @@ as output formatting) won't appear here.
518518
- `repo`: Repository name (string, required)
519519
- `title`: The new title for the pull request (string, required)
520520

521-
### `file_blame`
522-
523-
- **get_file_blame** - Get file blame information
524-
- **OAuth Challenge Scopes**: `repo`
525-
- `after`: Cursor for pagination. Use the cursor from the previous response. (string, optional)
526-
- `end_line`: Optional 1-based ending line of the window of interest. Must be >= start_line when both are provided. (number, optional)
527-
- `owner`: Repository owner (username or organization) (string, required)
528-
- `path`: Path to the file in the repository, relative to the repository root (string, required)
529-
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
530-
- `ref`: Git reference (branch, tag, or commit SHA). Defaults to the repository's default branch (HEAD). (string, optional)
531-
- `repo`: Repository name (string, required)
532-
- `start_line`: Optional 1-based starting line of the window of interest. Only ranges overlapping [start_line, end_line] are returned, clamped to the window. (number, optional)
533-
534521
### `issue_dependencies`
535522

536523
- **issue_dependency_read** - Read issue dependencies

‎docs/insiders-features.md‎

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,19 +26,6 @@ The list below is generated from the Go source. It covers tool **inventory and s
2626

2727
<!-- START AUTOMATED INSIDERS TOOLS -->
2828

29-
### `file_blame`
30-
31-
- **get_file_blame** - Get file blame information
32-
- **OAuth Challenge Scopes**: `repo`
33-
- `after`: Cursor for pagination. Use the cursor from the previous response. (string, optional)
34-
- `end_line`: Optional 1-based ending line of the window of interest. Must be >= start_line when both are provided. (number, optional)
35-
- `owner`: Repository owner (username or organization) (string, required)
36-
- `path`: Path to the file in the repository, relative to the repository root (string, required)
37-
- `perPage`: Results per page for pagination (min 1, max 100) (number, optional)
38-
- `ref`: Git reference (branch, tag, or commit SHA). Defaults to the repository's default branch (HEAD). (string, optional)
39-
- `repo`: Repository name (string, required)
40-
- `start_line`: Optional 1-based starting line of the window of interest. Only ranges overlapping [start_line, end_line] are returned, clamped to the window. (number, optional)
41-
4229
### `issue_dependencies`
4330

4431
- **issue_dependency_read** - Read issue dependencies

‎pkg/github/csv_output_test.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ func TestCSVOutputAppliedToDefaultListTools(t *testing.T) {
3939

4040
func TestCSVOutputAppliesToFlagGatedListTools(t *testing.T) {
4141
enabledOnly := testCSVOutputTool("list_things", `[{"number":1}]`)
42-
enabledOnly.FeatureRule = featureEnabledRule(FeatureFlagFileBlame)
42+
enabledOnly.FeatureRule = featureEnabledRule(FeatureFlagIssueDependencies)
4343
disabledOnly := testCSVOutputTool("list_legacy_things", `[{"number":2}]`)
44-
disabledOnly.FeatureRule = featureDisabledRule(FeatureFlagFileBlame)
44+
disabledOnly.FeatureRule = featureDisabledRule(FeatureFlagIssueDependencies)
4545

4646
tools := withCSVOutput([]inventory.ServerTool{enabledOnly, disabledOnly})
4747
require.Len(t, tools, 2)

‎pkg/github/feature_flags.go‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@ const FeatureFlagCSVOutput = "csv_output"
1616
// FeatureFlagIFCLabels is the feature flag name for IFC security labels in tool results.
1717
const FeatureFlagIFCLabels = "ifc_labels"
1818

19-
// FeatureFlagFileBlame is the feature flag name for the get_file_blame tool,
20-
// which exposes git blame information for a file. It is gated so the extra tool
21-
// is not advertised by default, keeping the tool surface small unless opted in.
22-
const FeatureFlagFileBlame = "file_blame"
23-
2419
// FeatureFlagIssueDependencies is the feature flag name for the issue dependency
2520
// tools (issue_dependency_read / issue_dependency_write), which read and edit an
2621
// issue's blocked-by / blocking relationships. It is gated so these tools are not
@@ -60,7 +55,6 @@ var AllowedFeatureFlags = []string{
6055
FeatureFlagIFCLabels,
6156
FeatureFlagIssuesGranular,
6257
FeatureFlagPullRequestsGranular,
63-
FeatureFlagFileBlame,
6458
FeatureFlagIssueDependencies,
6559
FeatureFlagIssueArtifacts,
6660
FeatureFlagPullRequestArtifacts,
@@ -75,7 +69,6 @@ var AllowedFeatureFlags = []string{
7569
// feature flag expansion.
7670
var InsidersFeatureFlags = []string{
7771
FeatureFlagCSVOutput,
78-
FeatureFlagFileBlame,
7972
FeatureFlagIssueDependencies,
8073
FeatureFlagSkillsExtension,
8174
}

‎pkg/github/feature_flags_benchmark_test.go‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ func BenchmarkFeatureInventory(b *testing.B) {
8787
b.ReportAllocs()
8888
b.ResetTimer()
8989
for b.Loop() {
90-
_ = inv.ForMCPRequest(inventory.MCPMethodToolsCall, "get_file_blame").ToolsForRegistration(context.Background())
90+
_ = inv.ForMCPRequest(inventory.MCPMethodToolsCall, "issue_dependency_read").ToolsForRegistration(context.Background())
9191
}
9292
b.ReportMetric(float64(calls.Load())/float64(b.N), "checks/op")
9393
})
@@ -147,7 +147,6 @@ func featureBenchmarkDistributions() []featureBenchmarkDistribution {
147147
name: "mixed",
148148
enabled: map[string]bool{
149149
FeatureFlagCSVOutput: true,
150-
FeatureFlagFileBlame: true,
151150
FeatureFlagIssuesGranular: true,
152151
FeatureFlagIssueDependencies: true,
153152
},

‎pkg/github/repositories.go‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2761,7 +2761,7 @@ func validateBlamePath(p string) error {
27612761
}
27622762

27632763
func GetFileBlame(t translations.TranslationHelperFunc) inventory.ServerTool {
2764-
st := NewTool[GetFileBlameInput, *RepositoryBlameOutput](
2764+
return NewTool[GetFileBlameInput, *RepositoryBlameOutput](
27652765
ToolsetMetadataRepos,
27662766
mcp.Tool{
27672767
Name: "get_file_blame",
@@ -3050,8 +3050,6 @@ func GetFileBlame(t translations.TranslationHelperFunc) inventory.ServerTool {
30503050
},
30513051
normalizeRepositoryBlameArguments,
30523052
)
3053-
st.FeatureRule = featureEnabledRule(FeatureFlagFileBlame)
3054-
return st
30553053
}
30563054

30573055
// ListRepositoryCollaborators creates a tool to list collaborators of a GitHub repository.

‎pkg/github/repositories_test.go‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6027,9 +6027,7 @@ func Test_GetFileBlame(t *testing.T) {
60276027
serverTool := GetFileBlame(translations.NullTranslationHelper)
60286028
tool := serverTool.Tool
60296029

6030-
// get_file_blame is gated so it is not advertised unless the feature flag
6031-
// (or insiders mode) opts it in.
6032-
assert.Equal(t, []inventory.FeatureFlag{FeatureFlagFileBlame}, serverTool.FeatureRule.Features())
6030+
assert.True(t, serverTool.FeatureRule.IsZero(), "get_file_blame is not feature-flag gated")
60336031

60346032
schema, ok := tool.InputSchema.(*jsonschema.Schema)
60356033
require.True(t, ok, "InputSchema should be *jsonschema.Schema")

‎pkg/http/oauth/oauth_test.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,12 +393,12 @@ func TestBuildResourceMetadataURL(t *testing.T) {
393393
setupRequest: func() *http.Request {
394394
return httptest.NewRequest(
395395
http.MethodGet,
396-
"/mcp?features=issue_dependencies%2Cfile_blame&client=web%20ide",
396+
"/mcp?features=issue_dependencies%2Ccsv_output&client=web%20ide",
397397
nil,
398398
)
399399
},
400400
resourcePath: "/mcp",
401-
expectedURL: "https://custom.example.com/.well-known/oauth-protected-resource/mcp?features=issue_dependencies%2Cfile_blame&client=web%20ide",
401+
expectedURL: "https://custom.example.com/.well-known/oauth-protected-resource/mcp?features=issue_dependencies%2Ccsv_output&client=web%20ide",
402402
},
403403
}
404404

0 commit comments

Comments
 (0)