Skip to content

Commit 31000b0

Browse files
authored
Wording
1 parent fe90c23 commit 31000b0

File tree

5 files changed

+7
-11
lines changed

5 files changed

+7
-11
lines changed

pkg/github/__toolsnaps__/get_project.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"title": "Get project",
44
"readOnlyHint": true
55
},
6-
"description": "Get Project for an user or org",
6+
"description": "Get Project for a user or org",
77
"inputSchema": {
88
"properties": {
99
"owner": {

pkg/github/__toolsnaps__/list_project_fields.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"title": "List project fields",
44
"readOnlyHint": true
55
},
6-
"description": "List Project fields for an user or org",
6+
"description": "List Project fields for a user or org",
77
"inputSchema": {
88
"properties": {
99
"owner": {

pkg/github/__toolsnaps__/list_projects.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"title": "List projects",
44
"readOnlyHint": true
55
},
6-
"description": "List Projects for an user or org",
6+
"description": "List Projects for a user or org",
77
"inputSchema": {
88
"properties": {
99
"owner": {

pkg/github/projects.go

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

2020
func ListProjects(getClient GetClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc) {
2121
return mcp.NewTool("list_projects",
22-
mcp.WithDescription(t("TOOL_LIST_PROJECTS_DESCRIPTION", "List Projects for an user or org")),
22+
mcp.WithDescription(t("TOOL_LIST_PROJECTS_DESCRIPTION", "List Projects for a user or org")),
2323
mcp.WithToolAnnotation(mcp.ToolAnnotation{Title: t("TOOL_LIST_PROJECTS_USER_TITLE", "List projects"), ReadOnlyHint: ToBoolPtr(true)}),
2424
mcp.WithString("owner_type", mcp.Required(), mcp.Description("Owner type"), mcp.Enum("user", "org")),
2525
mcp.WithString("owner", mcp.Required(), mcp.Description("If owner_type == user it is the handle for the GitHub user account. If owner_type == org it is the name of the organization. The name is not case sensitive.")),
@@ -101,7 +101,7 @@ func ListProjects(getClient GetClientFn, t translations.TranslationHelperFunc) (
101101

102102
func GetProject(getClient GetClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc) {
103103
return mcp.NewTool("get_project",
104-
mcp.WithDescription(t("TOOL_GET_PROJECT_DESCRIPTION", "Get Project for an user or org")),
104+
mcp.WithDescription(t("TOOL_GET_PROJECT_DESCRIPTION", "Get Project for a user or org")),
105105
mcp.WithToolAnnotation(mcp.ToolAnnotation{Title: t("TOOL_GET_PROJECT_USER_TITLE", "Get project"), ReadOnlyHint: ToBoolPtr(true)}),
106106
mcp.WithNumber("project_number", mcp.Required(), mcp.Description("The project's number")),
107107
mcp.WithString("owner_type", mcp.Required(), mcp.Description("Owner type"), mcp.Enum("user", "org")),
@@ -170,7 +170,7 @@ func GetProject(getClient GetClientFn, t translations.TranslationHelperFunc) (to
170170

171171
func ListProjectFields(getClient GetClientFn, t translations.TranslationHelperFunc) (tool mcp.Tool, handler server.ToolHandlerFunc) {
172172
return mcp.NewTool("list_project_fields",
173-
mcp.WithDescription(t("TOOL_LIST_PROJECT_FIELDS_DESCRIPTION", "List Project fields for an user or org")),
173+
mcp.WithDescription(t("TOOL_LIST_PROJECT_FIELDS_DESCRIPTION", "List Project fields for a user or org")),
174174
mcp.WithToolAnnotation(mcp.ToolAnnotation{Title: t("TOOL_LIST_PROJECT_FIELDS_USER_TITLE", "List project fields"), ReadOnlyHint: ToBoolPtr(true)}),
175175
mcp.WithString("owner_type", mcp.Required(), mcp.Description("Owner type"), mcp.Enum("user", "org")),
176176
mcp.WithString("owner", mcp.Required(), mcp.Description("If owner_type == user it is the handle for the GitHub user account. If owner_type == org it is the name of the organization. The name is not case sensitive.")),

pkg/github/projects_test.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ func Test_ListProjects(t *testing.T) {
7575
mock.EndpointPattern{Pattern: "/orgs/{org}/projectsV2", Method: http.MethodGet},
7676
http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
7777
q := r.URL.Query()
78-
// Assert query params present
7978
if q.Get("per_page") == "50" && q.Get("q") == "roadmap" {
8079
w.WriteHeader(http.StatusOK)
8180
_, _ = w.Write(mock.MustMarshal(orgProjects))
@@ -142,7 +141,6 @@ func Test_ListProjects(t *testing.T) {
142141
if tc.expectedErrMsg != "" {
143142
assert.Contains(t, text, tc.expectedErrMsg)
144143
}
145-
// Parameter missing cases
146144
if tc.name == "missing owner" {
147145
assert.Contains(t, text, "missing required parameter: owner")
148146
}
@@ -227,7 +225,7 @@ func Test_GetProject(t *testing.T) {
227225
"owner_type": "org",
228226
},
229227
expectError: true,
230-
expectedErrMsg: "failed to get project", // updated to match implementation
228+
expectedErrMsg: "failed to get project",
231229
},
232230
{
233231
name: "missing project_number",
@@ -294,7 +292,6 @@ func Test_GetProject(t *testing.T) {
294292
}
295293

296294
func Test_ListProjectFields(t *testing.T) {
297-
// Verify tool definition & schema snapshot
298295
mockClient := gh.NewClient(nil)
299296
tool, _ := ListProjectFields(stubGetClientFn(mockClient), translations.NullTranslationHelper)
300297
require.NoError(t, toolsnaps.Test(tool.Name, tool))
@@ -307,7 +304,6 @@ func Test_ListProjectFields(t *testing.T) {
307304
assert.Contains(t, tool.InputSchema.Properties, "per_page")
308305
assert.ElementsMatch(t, tool.InputSchema.Required, []string{"owner_type", "owner", "projectNumber"})
309306

310-
// Minimal field objects
311307
orgFields := []map[string]any{
312308
{"id": 101, "name": "Status", "dataType": "single_select"},
313309
}

0 commit comments

Comments
 (0)