mirror of
https://gitea.com/gitea/gitea-mcp.git
synced 2025-08-23 22:33:05 +00:00
style: refactor code formatting for clarity and conciseness
- Remove extra blank lines for cleaner code formatting - Combine variable declaration of GetGiteaMCPServerVersionTool into a single line for clarity Signed-off-by: appleboy <appleboy.tw@gmail.com>
This commit is contained in:
@@ -25,7 +25,6 @@ const (
|
|||||||
EditIssueToolName = "edit_issue"
|
EditIssueToolName = "edit_issue"
|
||||||
EditIssueCommentToolName = "edit_issue_comment"
|
EditIssueCommentToolName = "edit_issue_comment"
|
||||||
GetIssueCommentsByIndexToolName = "get_issue_comments_by_index"
|
GetIssueCommentsByIndexToolName = "get_issue_comments_by_index"
|
||||||
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@@ -289,7 +288,6 @@ func EditIssueFn(ctx context.Context, req mcp.CallToolRequest) (*mcp.CallToolRes
|
|||||||
return to.TextResult(issue)
|
return to.TextResult(issue)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
func EditIssueCommentFn(ctx context.Context, req mcp.CallToolRequest) (*mcp.CallToolResult, error) {
|
func EditIssueCommentFn(ctx context.Context, req mcp.CallToolRequest) (*mcp.CallToolResult, error) {
|
||||||
log.Debugf("Called EditIssueCommentFn")
|
log.Debugf("Called EditIssueCommentFn")
|
||||||
owner, ok := req.GetArguments()["owner"].(string)
|
owner, ok := req.GetArguments()["owner"].(string)
|
||||||
@@ -317,7 +315,6 @@ func EditIssueCommentFn(ctx context.Context, req mcp.CallToolRequest) (*mcp.Call
|
|||||||
}
|
}
|
||||||
|
|
||||||
return to.TextResult(issueComment)
|
return to.TextResult(issueComment)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func GetIssueCommentsByIndexFn(ctx context.Context, req mcp.CallToolRequest) (*mcp.CallToolResult, error) {
|
func GetIssueCommentsByIndexFn(ctx context.Context, req mcp.CallToolRequest) (*mcp.CallToolResult, error) {
|
||||||
|
@@ -19,12 +19,10 @@ const (
|
|||||||
GetGiteaMCPServerVersion = "get_gitea_mcp_server_version"
|
GetGiteaMCPServerVersion = "get_gitea_mcp_server_version"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var GetGiteaMCPServerVersionTool = mcp.NewTool(
|
||||||
GetGiteaMCPServerVersionTool = mcp.NewTool(
|
|
||||||
GetGiteaMCPServerVersion,
|
GetGiteaMCPServerVersion,
|
||||||
mcp.WithDescription("Get Gitea MCP Server Version"),
|
mcp.WithDescription("Get Gitea MCP Server Version"),
|
||||||
)
|
)
|
||||||
)
|
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
Tool.RegisterRead(server.ServerTool{
|
Tool.RegisterRead(server.ServerTool{
|
||||||
|
Reference in New Issue
Block a user