update_pull_request
Update a pull request by number, changing only provided fields like title, body, state, or base branch. Close or reopen without merging, replace labels, or change assignees and milestone.
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 |