Skip to content

Commit 89f62f0

Browse files
committed
Update flag name
1 parent 51bc74d commit 89f62f0

File tree

9 files changed

+47
-45
lines changed

9 files changed

+47
-45
lines changed

cmd/github-mcp-server/main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ var (
6161
EnableCommandLogging: viper.GetBool("enable-command-logging"),
6262
LogFilePath: viper.GetString("log-file"),
6363
ContentWindowSize: viper.GetInt("content-window-size"),
64-
LockdownEnabled: viper.GetBool("lockdown-enabled"),
64+
LockdownMode: viper.GetBool("lockdown-mode"),
6565
}
6666
return ghmcp.RunStdioServer(stdioServerConfig)
6767
},
@@ -83,7 +83,7 @@ func init() {
8383
rootCmd.PersistentFlags().Bool("export-translations", false, "Save translations to a JSON file")
8484
rootCmd.PersistentFlags().String("gh-host", "", "Specify the GitHub hostname (for GitHub Enterprise etc.)")
8585
rootCmd.PersistentFlags().Int("content-window-size", 5000, "Specify the content window size")
86-
rootCmd.PersistentFlags().Bool("lockdown-enabled", false, "Enable lockdown mode")
86+
rootCmd.PersistentFlags().Bool("lockdown-mode", false, "Enable lockdown mode")
8787

8888
// Bind flag to viper
8989
_ = viper.BindPFlag("toolsets", rootCmd.PersistentFlags().Lookup("toolsets"))
@@ -94,7 +94,7 @@ func init() {
9494
_ = viper.BindPFlag("export-translations", rootCmd.PersistentFlags().Lookup("export-translations"))
9595
_ = viper.BindPFlag("host", rootCmd.PersistentFlags().Lookup("gh-host"))
9696
_ = viper.BindPFlag("content-window-size", rootCmd.PersistentFlags().Lookup("content-window-size"))
97-
_ = viper.BindPFlag("lockdown-enabled", rootCmd.PersistentFlags().Lookup("lockdown-enabled"))
97+
_ = viper.BindPFlag("lockdown-mode", rootCmd.PersistentFlags().Lookup("lockdown-mode"))
9898

9999
// Add subcommands
100100
rootCmd.AddCommand(stdioCmd)

internal/ghmcp/server.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ type MCPServerConfig struct {
5252
// Content window size
5353
ContentWindowSize int
5454

55-
// LockdownEnabled indicates if we should enable lockdown mode
56-
LockdownEnabled bool
55+
// LockdownMode indicates if we should enable lockdown mode
56+
LockdownMode bool
5757
}
5858

5959
const stdioServerLogPrefix = "stdioserver"
@@ -164,7 +164,7 @@ func NewMCPServer(cfg MCPServerConfig) (*server.MCPServer, error) {
164164
getRawClient,
165165
cfg.Translator,
166166
cfg.ContentWindowSize,
167-
github.FeatureFlags{LockdownEnabled: cfg.LockdownEnabled},
167+
github.FeatureFlags{LockdownMode: cfg.LockdownMode},
168168
)
169169
err = tsg.EnableToolsets(enabledToolsets, nil)
170170

@@ -217,8 +217,8 @@ type StdioServerConfig struct {
217217
// Content window size
218218
ContentWindowSize int
219219

220-
// LockdownEnabled indicates if we should enable lockdown mode
221-
LockdownEnabled bool
220+
// LockdownMode indicates if we should enable lockdown mode
221+
LockdownMode bool
222222
}
223223

224224
// RunStdioServer is not concurrent safe.
@@ -238,7 +238,7 @@ func RunStdioServer(cfg StdioServerConfig) error {
238238
ReadOnly: cfg.ReadOnly,
239239
Translator: t,
240240
ContentWindowSize: cfg.ContentWindowSize,
241-
LockdownEnabled: cfg.LockdownEnabled,
241+
LockdownMode: cfg.LockdownMode,
242242
})
243243
if err != nil {
244244
return fmt.Errorf("failed to create MCP server: %w", err)
@@ -260,7 +260,7 @@ func RunStdioServer(cfg StdioServerConfig) error {
260260
slogHandler = slog.NewTextHandler(logOutput, &slog.HandlerOptions{Level: slog.LevelInfo})
261261
}
262262
logger := slog.New(slogHandler)
263-
logger.Info("starting server", "version", cfg.Version, "host", cfg.Host, "dynamicToolsets", cfg.DynamicToolsets, "readOnly", cfg.ReadOnly, "lockdownEnabled", cfg.LockdownEnabled)
263+
logger.Info("starting server", "version", cfg.Version, "host", cfg.Host, "dynamicToolsets", cfg.DynamicToolsets, "readOnly", cfg.ReadOnly, "lockdownEnabled", cfg.LockdownMode)
264264
stdLogger := log.New(logOutput, stdioServerLogPrefix, 0)
265265
stdioServer.SetErrorLogger(stdLogger)
266266

pkg/github/feature_flags.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@ package github
22

33
// FeatureFlags defines runtime feature toggles that adjust tool behavior.
44
type FeatureFlags struct {
5-
LockdownEnabled bool
5+
LockdownMode bool
66
}

pkg/github/issues.go

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -299,11 +299,11 @@ Options are:
299299
case "get":
300300
return GetIssue(ctx, client, gqlClient, owner, repo, issueNumber, flags)
301301
case "get_comments":
302-
return GetIssueComments(ctx, client, owner, repo, issueNumber, pagination)
302+
return GetIssueComments(ctx, client, owner, repo, issueNumber, pagination, flags)
303303
case "get_sub_issues":
304-
return GetSubIssues(ctx, client, owner, repo, issueNumber, pagination)
304+
return GetSubIssues(ctx, client, owner, repo, issueNumber, pagination, flags)
305305
case "get_labels":
306-
return GetIssueLabels(ctx, gqlClient, owner, repo, issueNumber)
306+
return GetIssueLabels(ctx, gqlClient, owner, repo, issueNumber, flags)
307307
default:
308308
return mcp.NewToolResultError(fmt.Sprintf("unknown method: %s", method)), nil
309309
}
@@ -325,10 +325,12 @@ func GetIssue(ctx context.Context, client *github.Client, gqlClient *githubv4.Cl
325325
return mcp.NewToolResultError(fmt.Sprintf("failed to get issue: %s", string(body))), nil
326326
}
327327

328-
if flags.LockdownEnabled {
329-
shouldFilter := lockdown.ShouldRemoveContent(ctx, gqlClient, *issue.User.Login, *issue.Repository.Owner.Login, *issue.Repository.Name)
330-
if shouldFilter {
331-
return mcp.NewToolResultError("access to issue details is restricted by lockdown mode"), nil
328+
if flags.LockdownMode {
329+
if issue.User != nil && issue.Repository != nil && issue.Repository.Owner != nil && issue.Repository.Name != nil {
330+
shouldRemoveContent := lockdown.ShouldRemoveContent(ctx, gqlClient, *issue.User.Login, *issue.Repository.Owner.Login, *issue.Repository.Name)
331+
if shouldRemoveContent {
332+
return mcp.NewToolResultError("access to issue details is restricted by lockdown mode"), nil
333+
}
332334
}
333335
}
334336

@@ -350,7 +352,7 @@ func GetIssue(ctx context.Context, client *github.Client, gqlClient *githubv4.Cl
350352
return mcp.NewToolResultText(string(r)), nil
351353
}
352354

353-
func GetIssueComments(ctx context.Context, client *github.Client, owner string, repo string, issueNumber int, pagination PaginationParams) (*mcp.CallToolResult, error) {
355+
func GetIssueComments(ctx context.Context, client *github.Client, owner string, repo string, issueNumber int, pagination PaginationParams, _ FeatureFlags) (*mcp.CallToolResult, error) {
354356
opts := &github.IssueListCommentsOptions{
355357
ListOptions: github.ListOptions{
356358
Page: pagination.Page,
@@ -380,7 +382,7 @@ func GetIssueComments(ctx context.Context, client *github.Client, owner string,
380382
return mcp.NewToolResultText(string(r)), nil
381383
}
382384

383-
func GetSubIssues(ctx context.Context, client *github.Client, owner string, repo string, issueNumber int, pagination PaginationParams) (*mcp.CallToolResult, error) {
385+
func GetSubIssues(ctx context.Context, client *github.Client, owner string, repo string, issueNumber int, pagination PaginationParams, _ FeatureFlags) (*mcp.CallToolResult, error) {
384386
opts := &github.IssueListOptions{
385387
ListOptions: github.ListOptions{
386388
Page: pagination.Page,
@@ -415,7 +417,7 @@ func GetSubIssues(ctx context.Context, client *github.Client, owner string, repo
415417
return mcp.NewToolResultText(string(r)), nil
416418
}
417419

418-
func GetIssueLabels(ctx context.Context, client *githubv4.Client, owner string, repo string, issueNumber int) (*mcp.CallToolResult, error) {
420+
func GetIssueLabels(ctx context.Context, client *githubv4.Client, owner string, repo string, issueNumber int, _ FeatureFlags) (*mcp.CallToolResult, error) {
419421
// Get current labels on the issue using GraphQL
420422
var query struct {
421423
Repository struct {

pkg/github/issues_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func Test_GetIssue(t *testing.T) {
2323
// Verify tool definition once
2424
mockClient := github.NewClient(nil)
2525
defaultGQLClient := githubv4.NewClient(nil)
26-
tool, _ := IssueRead(stubGetClientFn(mockClient), stubGetGQLClientFn(defaultGQLClient), translations.NullTranslationHelper, stubFeatureFlags(map[string]bool{"lockdown": false}))
26+
tool, _ := IssueRead(stubGetClientFn(mockClient), stubGetGQLClientFn(defaultGQLClient), translations.NullTranslationHelper, stubFeatureFlags(map[string]bool{"lockdown-mode": false}))
2727
require.NoError(t, toolsnaps.Test(tool.Name, tool))
2828

2929
assert.Equal(t, "issue_read", tool.Name)
@@ -213,7 +213,7 @@ func Test_GetIssue(t *testing.T) {
213213
gqlClient = defaultGQLClient
214214
}
215215

216-
flags := stubFeatureFlags(map[string]bool{"lockdown": tc.lockdownEnabled})
216+
flags := stubFeatureFlags(map[string]bool{"lockdown-mode": tc.lockdownEnabled})
217217
_, handler := IssueRead(stubGetClientFn(client), stubGetGQLClientFn(gqlClient), translations.NullTranslationHelper, flags)
218218

219219
request := createMCPRequest(tc.requestArgs)
@@ -1712,7 +1712,7 @@ func Test_GetIssueComments(t *testing.T) {
17121712
// Verify tool definition once
17131713
mockClient := github.NewClient(nil)
17141714
gqlClient := githubv4.NewClient(nil)
1715-
tool, _ := IssueRead(stubGetClientFn(mockClient), stubGetGQLClientFn(gqlClient), translations.NullTranslationHelper, stubFeatureFlags(map[string]bool{"lockdown": false}))
1715+
tool, _ := IssueRead(stubGetClientFn(mockClient), stubGetGQLClientFn(gqlClient), translations.NullTranslationHelper, stubFeatureFlags(map[string]bool{"lockdown-mode": false}))
17161716
require.NoError(t, toolsnaps.Test(tool.Name, tool))
17171717

17181718
assert.Equal(t, "issue_read", tool.Name)
@@ -1818,7 +1818,7 @@ func Test_GetIssueComments(t *testing.T) {
18181818
// Setup client with mock
18191819
client := github.NewClient(tc.mockedClient)
18201820
gqlClient := githubv4.NewClient(nil)
1821-
_, handler := IssueRead(stubGetClientFn(client), stubGetGQLClientFn(gqlClient), translations.NullTranslationHelper, stubFeatureFlags(map[string]bool{"lockdown": false}))
1821+
_, handler := IssueRead(stubGetClientFn(client), stubGetGQLClientFn(gqlClient), translations.NullTranslationHelper, stubFeatureFlags(map[string]bool{"lockdown-mode": false}))
18221822

18231823
// Create call request
18241824
request := createMCPRequest(tc.requestArgs)
@@ -1855,7 +1855,7 @@ func Test_GetIssueLabels(t *testing.T) {
18551855
// Verify tool definition
18561856
mockGQClient := githubv4.NewClient(nil)
18571857
mockClient := github.NewClient(nil)
1858-
tool, _ := IssueRead(stubGetClientFn(mockClient), stubGetGQLClientFn(mockGQClient), translations.NullTranslationHelper, stubFeatureFlags(map[string]bool{"lockdown": false}))
1858+
tool, _ := IssueRead(stubGetClientFn(mockClient), stubGetGQLClientFn(mockGQClient), translations.NullTranslationHelper, stubFeatureFlags(map[string]bool{"lockdown-mode": false}))
18591859
require.NoError(t, toolsnaps.Test(tool.Name, tool))
18601860

18611861
assert.Equal(t, "issue_read", tool.Name)
@@ -1930,7 +1930,7 @@ func Test_GetIssueLabels(t *testing.T) {
19301930
t.Run(tc.name, func(t *testing.T) {
19311931
gqlClient := githubv4.NewClient(tc.mockedClient)
19321932
client := github.NewClient(nil)
1933-
_, handler := IssueRead(stubGetClientFn(client), stubGetGQLClientFn(gqlClient), translations.NullTranslationHelper, stubFeatureFlags(map[string]bool{"lockdown": false}))
1933+
_, handler := IssueRead(stubGetClientFn(client), stubGetGQLClientFn(gqlClient), translations.NullTranslationHelper, stubFeatureFlags(map[string]bool{"lockdown-mode": false}))
19341934

19351935
request := createMCPRequest(tc.requestArgs)
19361936
result, err := handler(context.Background(), request)
@@ -2621,7 +2621,7 @@ func Test_GetSubIssues(t *testing.T) {
26212621
// Verify tool definition once
26222622
mockClient := github.NewClient(nil)
26232623
gqlClient := githubv4.NewClient(nil)
2624-
tool, _ := IssueRead(stubGetClientFn(mockClient), stubGetGQLClientFn(gqlClient), translations.NullTranslationHelper, stubFeatureFlags(map[string]bool{"lockdown": false}))
2624+
tool, _ := IssueRead(stubGetClientFn(mockClient), stubGetGQLClientFn(gqlClient), translations.NullTranslationHelper, stubFeatureFlags(map[string]bool{"lockdown-mode": false}))
26252625
require.NoError(t, toolsnaps.Test(tool.Name, tool))
26262626

26272627
assert.Equal(t, "issue_read", tool.Name)
@@ -2818,7 +2818,7 @@ func Test_GetSubIssues(t *testing.T) {
28182818
// Setup client with mock
28192819
client := github.NewClient(tc.mockedClient)
28202820
gqlClient := githubv4.NewClient(nil)
2821-
_, handler := IssueRead(stubGetClientFn(client), stubGetGQLClientFn(gqlClient), translations.NullTranslationHelper, stubFeatureFlags(map[string]bool{"lockdown": false}))
2821+
_, handler := IssueRead(stubGetClientFn(client), stubGetGQLClientFn(gqlClient), translations.NullTranslationHelper, stubFeatureFlags(map[string]bool{"lockdown-mode": false}))
28222822

28232823
// Create call request
28242824
request := createMCPRequest(tc.requestArgs)

pkg/github/pullrequests.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
)
2020

2121
// GetPullRequest creates a tool to get details of a specific pull request.
22-
func PullRequestRead(getClient GetClientFn, t translations.TranslationHelperFunc) (mcp.Tool, server.ToolHandlerFunc) {
22+
func PullRequestRead(getClient GetClientFn, t translations.TranslationHelperFunc, flags FeatureFlags) (mcp.Tool, server.ToolHandlerFunc) {
2323
return mcp.NewTool("pull_request_read",
2424
mcp.WithDescription(t("TOOL_PULL_REQUEST_READ_DESCRIPTION", "Get information on a specific pull request in GitHub repository.")),
2525
mcp.WithToolAnnotation(mcp.ToolAnnotation{
@@ -98,7 +98,7 @@ Possible options:
9898
case "get_reviews":
9999
return GetPullRequestReviews(ctx, client, owner, repo, pullNumber)
100100
case "get_comments":
101-
return GetIssueComments(ctx, client, owner, repo, pullNumber, pagination)
101+
return GetIssueComments(ctx, client, owner, repo, pullNumber, pagination, flags)
102102
default:
103103
return nil, fmt.Errorf("unknown method: %s", method)
104104
}

pkg/github/pullrequests_test.go

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
func Test_GetPullRequest(t *testing.T) {
2222
// Verify tool definition once
2323
mockClient := github.NewClient(nil)
24-
tool, _ := PullRequestRead(stubGetClientFn(mockClient), translations.NullTranslationHelper)
24+
tool, _ := PullRequestRead(stubGetClientFn(mockClient), translations.NullTranslationHelper, stubFeatureFlags(map[string]bool{"lockdown-mode": false}))
2525
require.NoError(t, toolsnaps.Test(tool.Name, tool))
2626

2727
assert.Equal(t, "pull_request_read", tool.Name)
@@ -102,7 +102,7 @@ func Test_GetPullRequest(t *testing.T) {
102102
t.Run(tc.name, func(t *testing.T) {
103103
// Setup client with mock
104104
client := github.NewClient(tc.mockedClient)
105-
_, handler := PullRequestRead(stubGetClientFn(client), translations.NullTranslationHelper)
105+
_, handler := PullRequestRead(stubGetClientFn(client), translations.NullTranslationHelper, stubFeatureFlags(map[string]bool{"lockdown-mode": false}))
106106

107107
// Create call request
108108
request := createMCPRequest(tc.requestArgs)
@@ -1133,7 +1133,7 @@ func Test_SearchPullRequests(t *testing.T) {
11331133
func Test_GetPullRequestFiles(t *testing.T) {
11341134
// Verify tool definition once
11351135
mockClient := github.NewClient(nil)
1136-
tool, _ := PullRequestRead(stubGetClientFn(mockClient), translations.NullTranslationHelper)
1136+
tool, _ := PullRequestRead(stubGetClientFn(mockClient), translations.NullTranslationHelper, stubFeatureFlags(map[string]bool{"lockdown-mode": false}))
11371137
require.NoError(t, toolsnaps.Test(tool.Name, tool))
11381138

11391139
assert.Equal(t, "pull_request_read", tool.Name)
@@ -1236,7 +1236,7 @@ func Test_GetPullRequestFiles(t *testing.T) {
12361236
t.Run(tc.name, func(t *testing.T) {
12371237
// Setup client with mock
12381238
client := github.NewClient(tc.mockedClient)
1239-
_, handler := PullRequestRead(stubGetClientFn(client), translations.NullTranslationHelper)
1239+
_, handler := PullRequestRead(stubGetClientFn(client), translations.NullTranslationHelper, stubFeatureFlags(map[string]bool{"lockdown-mode": false}))
12401240

12411241
// Create call request
12421242
request := createMCPRequest(tc.requestArgs)
@@ -1277,7 +1277,7 @@ func Test_GetPullRequestFiles(t *testing.T) {
12771277
func Test_GetPullRequestStatus(t *testing.T) {
12781278
// Verify tool definition once
12791279
mockClient := github.NewClient(nil)
1280-
tool, _ := PullRequestRead(stubGetClientFn(mockClient), translations.NullTranslationHelper)
1280+
tool, _ := PullRequestRead(stubGetClientFn(mockClient), translations.NullTranslationHelper, stubFeatureFlags(map[string]bool{"lockdown-mode": false}))
12811281
require.NoError(t, toolsnaps.Test(tool.Name, tool))
12821282

12831283
assert.Equal(t, "pull_request_read", tool.Name)
@@ -1404,7 +1404,7 @@ func Test_GetPullRequestStatus(t *testing.T) {
14041404
t.Run(tc.name, func(t *testing.T) {
14051405
// Setup client with mock
14061406
client := github.NewClient(tc.mockedClient)
1407-
_, handler := PullRequestRead(stubGetClientFn(client), translations.NullTranslationHelper)
1407+
_, handler := PullRequestRead(stubGetClientFn(client), translations.NullTranslationHelper, stubFeatureFlags(map[string]bool{"lockdown-mode": false}))
14081408

14091409
// Create call request
14101410
request := createMCPRequest(tc.requestArgs)
@@ -1566,7 +1566,7 @@ func Test_UpdatePullRequestBranch(t *testing.T) {
15661566
func Test_GetPullRequestComments(t *testing.T) {
15671567
// Verify tool definition once
15681568
mockClient := github.NewClient(nil)
1569-
tool, _ := PullRequestRead(stubGetClientFn(mockClient), translations.NullTranslationHelper)
1569+
tool, _ := PullRequestRead(stubGetClientFn(mockClient), translations.NullTranslationHelper, stubFeatureFlags(map[string]bool{"lockdown-mode": false}))
15701570
require.NoError(t, toolsnaps.Test(tool.Name, tool))
15711571

15721572
assert.Equal(t, "pull_request_read", tool.Name)
@@ -1658,7 +1658,7 @@ func Test_GetPullRequestComments(t *testing.T) {
16581658
t.Run(tc.name, func(t *testing.T) {
16591659
// Setup client with mock
16601660
client := github.NewClient(tc.mockedClient)
1661-
_, handler := PullRequestRead(stubGetClientFn(client), translations.NullTranslationHelper)
1661+
_, handler := PullRequestRead(stubGetClientFn(client), translations.NullTranslationHelper, stubFeatureFlags(map[string]bool{"lockdown-mode": false}))
16621662

16631663
// Create call request
16641664
request := createMCPRequest(tc.requestArgs)
@@ -1700,7 +1700,7 @@ func Test_GetPullRequestComments(t *testing.T) {
17001700
func Test_GetPullRequestReviews(t *testing.T) {
17011701
// Verify tool definition once
17021702
mockClient := github.NewClient(nil)
1703-
tool, _ := PullRequestRead(stubGetClientFn(mockClient), translations.NullTranslationHelper)
1703+
tool, _ := PullRequestRead(stubGetClientFn(mockClient), translations.NullTranslationHelper, stubFeatureFlags(map[string]bool{"lockdown-mode": false}))
17041704
require.NoError(t, toolsnaps.Test(tool.Name, tool))
17051705

17061706
assert.Equal(t, "pull_request_read", tool.Name)
@@ -1788,7 +1788,7 @@ func Test_GetPullRequestReviews(t *testing.T) {
17881788
t.Run(tc.name, func(t *testing.T) {
17891789
// Setup client with mock
17901790
client := github.NewClient(tc.mockedClient)
1791-
_, handler := PullRequestRead(stubGetClientFn(client), translations.NullTranslationHelper)
1791+
_, handler := PullRequestRead(stubGetClientFn(client), translations.NullTranslationHelper, stubFeatureFlags(map[string]bool{"lockdown-mode": false}))
17921792

17931793
// Create call request
17941794
request := createMCPRequest(tc.requestArgs)
@@ -2789,7 +2789,7 @@ func TestGetPullRequestDiff(t *testing.T) {
27892789

27902790
// Verify tool definition once
27912791
mockClient := github.NewClient(nil)
2792-
tool, _ := PullRequestRead(stubGetClientFn(mockClient), translations.NullTranslationHelper)
2792+
tool, _ := PullRequestRead(stubGetClientFn(mockClient), translations.NullTranslationHelper, stubFeatureFlags(map[string]bool{"lockdown-mode": false}))
27932793
require.NoError(t, toolsnaps.Test(tool.Name, tool))
27942794

27952795
assert.Equal(t, "pull_request_read", tool.Name)
@@ -2847,7 +2847,7 @@ index 5d6e7b2..8a4f5c3 100644
28472847

28482848
// Setup client with mock
28492849
client := github.NewClient(tc.mockedClient)
2850-
_, handler := PullRequestRead(stubGetClientFn(client), translations.NullTranslationHelper)
2850+
_, handler := PullRequestRead(stubGetClientFn(client), translations.NullTranslationHelper, stubFeatureFlags(map[string]bool{"lockdown-mode": false}))
28512851

28522852
// Create call request
28532853
request := createMCPRequest(tc.requestArgs)

pkg/github/server_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func stubGetGQLClientFn(client *githubv4.Client) GetGQLClientFn {
4040

4141
func stubFeatureFlags(enabledFlags map[string]bool) FeatureFlags {
4242
return FeatureFlags{
43-
LockdownEnabled: enabledFlags["lockdown"],
43+
LockdownMode: enabledFlags["lockdown-mode"],
4444
}
4545
}
4646

pkg/github/tools.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ func DefaultToolsetGroup(readOnly bool, getClient GetClientFn, getGQLClient GetG
216216
)
217217
pullRequests := toolsets.NewToolset(ToolsetMetadataPullRequests.ID, ToolsetMetadataPullRequests.Description).
218218
AddReadTools(
219-
toolsets.NewServerTool(PullRequestRead(getClient, t)),
219+
toolsets.NewServerTool(PullRequestRead(getClient, t, flags)),
220220
toolsets.NewServerTool(ListPullRequests(getClient, t)),
221221
toolsets.NewServerTool(SearchPullRequests(getClient, t)),
222222
).

0 commit comments

Comments
 (0)