fix(pr_merge): send Gitea's merge_title_field; merge_message_title was silently ignored (gitea-mcp#77)
CD / Lint / Test / Vet (pull_request) Successful in 28s
CD / Build & Import (pull_request) Skipped
CD / Deploy via GitOps (pull_request) Skipped

Gitea 1.27's MergePullRequestOption has merge_title_field, not merge_message_title; an unknown field is
dropped without an error, so a custom merge title never took effect. The tool's argument keeps its name.
The new test checks the field name on the wire (the existing fake never did).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SZkhi49hfeSqBp5aZJNXsM
This commit is contained in:
2026-10-10 10:48:55 +02:00
co-authored by Claude Sonnet 5.5
parent e8521c2555
commit eb8e6d5169
2 changed files with 17 additions and 1 deletions
+1 -1
View File
@@ -107,7 +107,7 @@ func (c *Client) GetPullRequestDiff(ctx context.Context, owner, repo string, ind
type MergePRArgs struct {
Do string `json:"Do"`
Title string `json:"merge_message_title,omitempty"`
Title string `json:"merge_title_field,omitempty"`
Body string `json:"merge_message_field,omitempty"`
// HeadCommitID binds the merge to the commit whose CI was checked: if the PR branch moved, Gitea refuses.
HeadCommitID string `json:"head_commit_id,omitempty"`