update_pull_request
Update a pull request by index. Modify title, body, state, base branch, labels, assignees, or milestone. Close a PR without merging by setting state to 'closed'; reopen with 'open'.
Instructions
Update one pull request by index (PATCH: only provided fields change). Set state to 'closed' to close a PR WITHOUT merging (reopens with 'open'). RISK: passing labels REPLACES the entire label set (give the full desired ID list); base retargets the PR and is rarely reversible. To change a single label use add_issue_labels/remove_issue_label (PR #N == Issue #N — label endpoints are shared).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| base | No | New target branch name (retargeting a PR is rarely reversible) | |
| body | No | New pull request body/description | |
| repo | No | Repository name (defaults to GITEA_DEFAULT_REPO) | |
| index | Yes | Pull request number | |
| owner | No | Repository owner (defaults to GITEA_DEFAULT_OWNER) | |
| state | No | Pull request state — 'closed' closes the PR without merging | |
| title | No | New pull request title | |
| labels | No | List of label IDs (REPLACES the entire set) | |
| assignee | No | Assignee username | |
| assignees | No | List of assignee usernames | |
| milestone | No | Milestone ID |