You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| Code Security | Code security related tools, such as GitHub Code Scanning |https://api.githubcopilot.com/mcp/x/code_security|[Install](https://insiders.vscode.dev/redirect/mcp/install?name=gh-code_security&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fcode_security%22%7D)|[read-only](https://api.githubcopilot.com/mcp/x/code_security/readonly)|[Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=gh-code_security&config=%7B%22type%22%3A%20%22http%22%2C%22url%22%3A%20%22https%3A%2F%2Fapi.githubcopilot.com%2Fmcp%2Fx%2Fcode_security%2Freadonly%22%7D)|
Copy file name to clipboardExpand all lines: pkg/github/context_tools.go
+14-22Lines changed: 14 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -107,6 +107,14 @@ type OrganizationTeams struct {
107
107
Teams []TeamInfo`json:"teams"`
108
108
}
109
109
110
+
typeOutUserstruct {
111
+
Loginstring`json:"login"`
112
+
IDstring`json:"id"`
113
+
AvatarURLstring`json:"avatar_url"`
114
+
Typestring`json:"type"`
115
+
SiteAdminbool`json:"site_admin"`
116
+
}
117
+
110
118
funcGetTeams(getClientGetClientFn, getGQLClientGetGQLClientFn, t translations.TranslationHelperFunc) (mcp.Tool, server.ToolHandlerFunc) {
111
119
returnmcp.NewTool("get_teams",
112
120
mcp.WithDescription(t("TOOL_GET_TEAMS_DESCRIPTION", "Get details of the teams the user is a member of. Limited to organizations accessible with current credentials")),
@@ -254,7 +262,7 @@ func GetTeamMembers(getGQLClient GetGQLClientFn, t translations.TranslationHelpe
254
262
}
255
263
}
256
264
257
-
funcgetOrgMembers(getClientGetClientFn, t translations.TranslationHelperFunc) (mcp.Tool, server.ToolHandlerFunc) {
265
+
funcGetOrgMembers(getClientGetClientFn, t translations.TranslationHelperFunc) (mcp.Tool, server.ToolHandlerFunc) {
258
266
returnmcp.NewTool("get_org_members",
259
267
mcp.WithDescription(t("TOOL_GET_ORG_MEMBERS_DESCRIPTION", "Get member users of a specific organization. Returns a list of user objects with fields: login, id, avatar_url, type. Limited to organizations accessible with current credentials")),
260
268
mcp.WithString("org",
@@ -329,17 +337,9 @@ func getOrgMembers(getClient GetClientFn, t translations.TranslationHelperFunc)
329
337
returnghErrors.NewGitHubAPIErrorResponse(ctx, "Failed to get organization members", resp, err), nil
330
338
}
331
339
332
-
typeoutUserstruct {
333
-
Loginstring`json:"login"`
334
-
IDstring`json:"id"`
335
-
AvatarURLstring`json:"avatar_url"`
336
-
Typestring`json:"type"`
337
-
SiteAdminbool`json:"site_admin"`
338
-
}
339
-
340
-
varmembers []outUser
340
+
varmembers []OutUser
341
341
for_, u:=rangeusers {
342
-
members=append(members, outUser{
342
+
members=append(members, OutUser{
343
343
Login: u.GetLogin(),
344
344
ID: fmt.Sprintf("%v", u.GetID()),
345
345
AvatarURL: u.GetAvatarURL(),
@@ -352,7 +352,7 @@ func getOrgMembers(getClient GetClientFn, t translations.TranslationHelperFunc)
352
352
}
353
353
}
354
354
355
-
funclistOutsideCollaborators(getClientGetClientFn, t translations.TranslationHelperFunc) (mcp.Tool, server.ToolHandlerFunc) {
355
+
funcListOutsideCollaborators(getClientGetClientFn, t translations.TranslationHelperFunc) (mcp.Tool, server.ToolHandlerFunc) {
356
356
returnmcp.NewTool("list_outside_collaborators",
357
357
mcp.WithDescription(t("TOOL_LIST_OUTSIDE_COLLABORATORS_DESCRIPTION", "List all outside collaborators of an organization (users with access to organization repositories but not members).")),
358
358
mcp.WithString("org",
@@ -416,17 +416,9 @@ func listOutsideCollaborators(getClient GetClientFn, t translations.TranslationH
416
416
returnghErrors.NewGitHubAPIErrorResponse(ctx, "Failed to list outside collaborators", resp, err), nil
0 commit comments