mirror of
https://gitea.com/gitea/gitea-mcp.git
synced 2026-03-25 14:25:13 +00:00
Add missing tool parameters from Gitea SDK
Expose additional parameters that the Gitea SDK supports but were not yet wired through the MCP tool definitions: - list_issues: labels, since, before filters - issue_write: labels and deadline on create, deadline/remove_deadline on update - pull_request_write: labels/deadline on create/update, remove_deadline on update, force_merge/merge_when_checks_succeed/head_commit_id on merge - list_branches: page/perPage pagination - create_repo: trust_model, object_format_name - label_write: is_archived on create/edit Also adds params.GetOptionalTime helper for RFC3339 timestamp parsing and tests for the most important new parameters. Co-Authored-By: Claude (claude-opus-4-6) <noreply@anthropic.com>
This commit is contained in:
@@ -39,6 +39,8 @@ var (
|
||||
mcp.WithString("license", mcp.Description("License to use")),
|
||||
mcp.WithString("readme", mcp.Description("Readme of the repository to create")),
|
||||
mcp.WithString("default_branch", mcp.Description("DefaultBranch of the repository (used when initializes and in template)")),
|
||||
mcp.WithString("trust_model", mcp.Description("Trust model for verifying GPG signatures"), mcp.Enum("default", "collaborator", "committer", "collaboratorcommitter")),
|
||||
mcp.WithString("object_format_name", mcp.Description("Object format: sha1 or sha256"), mcp.Enum("sha1", "sha256")),
|
||||
mcp.WithString("organization", mcp.Description("Organization name to create repository in (optional - defaults to personal account)")),
|
||||
)
|
||||
|
||||
@@ -102,19 +104,23 @@ func CreateRepoFn(ctx context.Context, req mcp.CallToolRequest) (*mcp.CallToolRe
|
||||
license, _ := args["license"].(string)
|
||||
readme, _ := args["readme"].(string)
|
||||
defaultBranch, _ := args["default_branch"].(string)
|
||||
trustModel, _ := args["trust_model"].(string)
|
||||
objectFormatName, _ := args["object_format_name"].(string)
|
||||
organization, _ := args["organization"].(string)
|
||||
|
||||
opt := gitea_sdk.CreateRepoOption{
|
||||
Name: name,
|
||||
Description: description,
|
||||
Private: private,
|
||||
IssueLabels: issueLabels,
|
||||
AutoInit: autoInit,
|
||||
Template: template,
|
||||
Gitignores: gitignores,
|
||||
License: license,
|
||||
Readme: readme,
|
||||
DefaultBranch: defaultBranch,
|
||||
Name: name,
|
||||
Description: description,
|
||||
Private: private,
|
||||
IssueLabels: issueLabels,
|
||||
AutoInit: autoInit,
|
||||
Template: template,
|
||||
Gitignores: gitignores,
|
||||
License: license,
|
||||
Readme: readme,
|
||||
DefaultBranch: defaultBranch,
|
||||
TrustModel: gitea_sdk.TrustModel(trustModel),
|
||||
ObjectFormatName: objectFormatName,
|
||||
}
|
||||
|
||||
var repo *gitea_sdk.Repository
|
||||
|
||||
Reference in New Issue
Block a user