Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

rename tooling#1198

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
tonytrg merged 2 commits intomainfromtonytrg/rename-tools
Oct 9, 2025
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 6 additions & 15 deletionsREADME.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -668,15 +668,6 @@ The following sets of tools are available (all are on by default):
-`title`: New title (string, optional)
-`type`: New issue type (string, optional)

-**write_label** - Write operations on repository labels.
-`color`: Label color as 6-character hex code without '#' prefix (e.g., 'f29513'). Required for 'create', optional for 'update'. (string, optional)
-`description`: Label description text. Optional for 'create' and 'update'. (string, optional)
-`method`: Operation to perform: 'create', 'update', or 'delete' (string, required)
-`name`: Label name - required for all operations (string, required)
-`new_name`: New name for the label (used only with 'update' method to rename) (string, optional)
-`owner`: Repository owner (username or organization name) (string, required)
-`repo`: Repository name (string, required)

</details>

<details>
Expand All@@ -688,12 +679,7 @@ The following sets of tools are available (all are on by default):
-`owner`: Repository owner (username or organization name) (string, required)
-`repo`: Repository name (string, required)

-**list_label** - List labels from a repository or an issue
-`issue_number`: Issue number - if provided, lists labels on the specific issue (number, optional)
-`owner`: Repository owner (username or organization name) - required for all operations (string, required)
-`repo`: Repository name - required for all operations (string, required)

-**write_label** - Write operations on repository labels.
-**label_write** - Write operations on repository labels.
-`color`: Label color as 6-character hex code without '#' prefix (e.g., 'f29513'). Required for 'create', optional for 'update'. (string, optional)
-`description`: Label description text. Optional for 'create' and 'update'. (string, optional)
-`method`: Operation to perform: 'create', 'update', or 'delete' (string, required)
Expand All@@ -702,6 +688,11 @@ The following sets of tools are available (all are on by default):
-`owner`: Repository owner (username or organization name) (string, required)
-`repo`: Repository name (string, required)

-**list_label** - List labels from a repository or an issue
-`issue_number`: Issue number - if provided, lists labels on the specific issue (number, optional)
-`owner`: Repository owner (username or organization name) - required for all operations (string, required)
-`repo`: Repository name - required for all operations (string, required)

</details>

<details>
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -48,5 +48,5 @@
],
"type": "object"
},
"name": "write_label"
"name": "label_write"
}
10 changes: 5 additions & 5 deletionspkg/github/labels.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -239,13 +239,13 @@ func ListLabels(getGQLClient GetGQLClientFn, t translations.TranslationHelperFun
}
}

//WriteLabel handles create, update, and delete operations for GitHub labels
funcWriteLabel(getGQLClientGetGQLClientFn,t translations.TranslationHelperFunc) (mcp.Tool, server.ToolHandlerFunc) {
//LabelWrite handles create, update, and delete operations for GitHub labels
funcLabelWrite(getGQLClientGetGQLClientFn,t translations.TranslationHelperFunc) (mcp.Tool, server.ToolHandlerFunc) {
returnmcp.NewTool(
"write_label",
mcp.WithDescription(t("TOOL_WRITE_LABEL_DESCRIPTION","Perform write operations on repository labels. To set labels on issues, use the 'update_issue' tool.")),
"label_write",
mcp.WithDescription(t("TOOL_LABEL_WRITE_DESCRIPTION","Perform write operations on repository labels. To set labels on issues, use the 'update_issue' tool.")),
mcp.WithToolAnnotation(mcp.ToolAnnotation{
Title:t("TOOL_WRITE_LABEL_TITLE","Write operations on repository labels."),
Title:t("TOOL_LABEL_WRITE_TITLE","Write operations on repository labels."),
Comment on lines +246 to +248
Copy link

CopilotAIOct 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

The translation keys have been updated from TOOL_WRITE_LABEL_* to TOOL_LABEL_WRITE_* but there's no evidence that the corresponding translation files have been updated. This could result in missing translations falling back to the default English text.

Copilot uses AI. Check for mistakes.
ReadOnlyHint:ToBoolPtr(false),
}),
mcp.WithString("method",
Expand Down
6 changes: 3 additions & 3 deletionspkg/github/labels_test.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -291,10 +291,10 @@ func TestWriteLabel(t *testing.T) {

// Verify tool definition
mockClient:=githubv4.NewClient(nil)
tool,_:=WriteLabel(stubGetGQLClientFn(mockClient),translations.NullTranslationHelper)
tool,_:=LabelWrite(stubGetGQLClientFn(mockClient),translations.NullTranslationHelper)
require.NoError(t,toolsnaps.Test(tool.Name,tool))

assert.Equal(t,"write_label",tool.Name)
assert.Equal(t,"label_write",tool.Name)
assert.NotEmpty(t,tool.Description)
assert.Contains(t,tool.InputSchema.Properties,"method")
assert.Contains(t,tool.InputSchema.Properties,"owner")
Expand DownExpand Up@@ -520,7 +520,7 @@ func TestWriteLabel(t *testing.T) {
for_,tc:=rangetests {
t.Run(tc.name,func(t*testing.T) {
client:=githubv4.NewClient(tc.mockedClient)
_,handler:=WriteLabel(stubGetGQLClientFn(client),translations.NullTranslationHelper)
_,handler:=LabelWrite(stubGetGQLClientFn(client),translations.NullTranslationHelper)

request:=createMCPRequest(tc.requestArgs)
result,err:=handler(context.Background(),request)
Expand Down
3 changes: 1 addition & 2 deletionspkg/github/tools.go
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -188,7 +188,6 @@ func DefaultToolsetGroup(readOnly bool, getClient GetClientFn, getGQLClient GetG
toolsets.NewServerTool(AddSubIssue(getClient,t)),
toolsets.NewServerTool(RemoveSubIssue(getClient,t)),
toolsets.NewServerTool(ReprioritizeSubIssue(getClient,t)),
toolsets.NewServerTool(WriteLabel(getGQLClient,t)),
).AddPrompts(
toolsets.NewServerPrompt(AssignCodingAgentPrompt(t)),
toolsets.NewServerPrompt(IssueToFixWorkflowPrompt(t)),
Expand DownExpand Up@@ -335,7 +334,7 @@ func DefaultToolsetGroup(readOnly bool, getClient GetClientFn, getGQLClient GetG
).
AddWriteTools(
// create or update
toolsets.NewServerTool(WriteLabel(getGQLClient,t)),
toolsets.NewServerTool(LabelWrite(getGQLClient,t)),
)
// Add toolsets to the group
tsg.AddToolset(contextTools)
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp