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

Commit18b51d4

Browse files
committed
add comment
1 parentd22667f commit18b51d4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

‎pkg/github/repositories.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,11 @@ func ForkRepository(getClient GetClientFn, t translations.TranslationHelperFunc)
557557
}
558558

559559
// DeleteFile creates a tool to delete a file in a GitHub repository.
560+
// This tool uses a more roundabout way of deleting a file than just using the client.Repositories.DeleteFile.
561+
// This is because REST file deletion endpoint (and client.Repositories.DeleteFile) don't add commit signing to the deletion commit,
562+
// unlike how the endpoint backing the create_or_update_files tool does. This appears to be a quirk of the API.
563+
// The approach implemented here gets automatic commit signing when used with either the github-actions user or as an app,
564+
// both of which suit an LLM well.
560565
funcDeleteFile(getClientGetClientFn,t translations.TranslationHelperFunc) (tool mcp.Tool,handler server.ToolHandlerFunc) {
561566
returnmcp.NewTool("delete_file",
562567
mcp.WithDescription(t("TOOL_DELETE_FILE_DESCRIPTION","Delete a file from a GitHub repository")),

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp