fix(gitea): correct which pull_request_write params apply on create #106
Reference in New Issue
Block a user
Delete Branch "fix/gitea-prs-create-drops-params"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #104.
What was wrong
references/pull-requests.mddocumentedmilestoneas "settable on both"create"and"update"". It is not.pull_request_write method: "create"accepts the parameter, returns no error and no warning, and discards it.Scope is wider than the issue supposed
#104 was filed from observed behaviour and flagged
assignees/reviewersas untested but suspect. I verified against thegitea-mcpv1.6.0 source rather than by observation alone —get_gitea_mcp_server_versionconfirms that is the running server.createPullRequestFn(operation/pull/pull.go:430) builds its option struct from a fixed, short list:So the suspicion was correct, and the drop is not limited to
milestone:"create""update"labels,deadlineassignee,assignees,milestone"update"onlyreviewers,team_reviewers"add_reviewers"/"remove_reviewers"onlyThe old text claimed create-time settability for
reviewers/team_reviewerstoo, so that line was wrong in the same way and is corrected here.Why it was easy to get wrong
Both properties are now written down next to the correction, because neither is discoverable from a create response:
labelssits besidemilestone, reads identically, and does apply on create. A caller who confirms the labels landed will reasonably assume the milestone did too.issue_write method: "create"does honourassigneesandmilestone— I checkedcreateIssueFnto be sure. The asymmetry is specific to pull requests, so experience with the issue write actively misleads you here.Nothing in the create response distinguishes a dropped parameter from one never passed — the key is simply absent.
Adjacent correction, beyond the issue's ask
The neighbouring draft gotcha prescribed reconstructing the un-prefixed title by hand to un-draft a PR.
applyDraftPrefixshows"update"withdraft: falseand notitlefetches the stored title and strips the prefix server-side. Same class of defect, same file, one sentence — called out separately so it can be dropped if you'd rather keep this PR to the issue's scope.Verification
bash tests/run-tests.sh --strict— 24 passed, 0 skipped, 0 failedpre-commit run --hook-stage pre-push --all-files— all 16 passskill-size-check ... Skipped, sogitea-prsneeded no #99 retrofit firstscripts/sync-plugin-content.sh plugins/gitea, not hand-editedDocumentation only; no behaviour change. Callers following the old text silently opened PRs with no milestone, assignee or reviewer.
Refs #99.