Edit a GitHub pull request
github_pr_editChange pull request details in one call: title, body, base branch, labels, assignees, reviewers, milestone, and closing issues.
Instructions
Change a pull request in one call: title, body (body replaces it, append_body adds after a blank line), base branch (not for a merged pull request), labels, assignees and reviewers to add or remove (added assignees and reviewers are notified), milestone or remove_milestone, and the issues it closes (add_closes adds a Closes #12 line to the body, remove_closes removes such lines). A milestone that does not exist is an error. Needs write permission on the repository. append_body goes before the closing lines (Closes #12) the body ends with, so those stay the last lines. After closing issues change, the call waits up to a few seconds for GitHub to link them, then lists closing_issues as GitHub links them and notes say when one is not linked (a pull request into a branch other than the default branch links none; otherwise it may link it a moment later) or is still linked (another form of mention in the body or a commit message). A pull request is 12, #12, owner/repo#12 or its URL; a bare number means the working tree's repository, or repo. Attachments are images (png, jpg, gif, webp, svg, up to 10 MiB) and videos (mp4, mov, webm, up to 100 MiB), up to 50, uploaded with the text: a body reference like  becomes the uploaded file and the others are appended; they need gh 2.99 or newer, and a file that fails to upload is listed under errors.attachments while the rest goes through.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pr | Yes | The pull request, as 12, #12, owner/repo#12 or its URL. | |
| base | No | The branch of the repository to merge into; not for a merged pull request. | |
| body | No | The new body, which replaces the whole old one; empty clears it. | |
| repo | No | owner/name; defaults to the working tree's repository (its origin). Used for a bare number. | |
| title | No | The new title. | |
| milestone | No | A milestone title to set; it must exist. | |
| add_closes | No | Issues to close when it merges, in the same forms as closes: a `Closes #12` line is added to the end of the body unless the body has one already. | |
| add_labels | No | Labels to add; they must exist. | |
| append_body | No | Text added after the current body, set off by a blank line. | |
| attachments | No | Images and videos to upload with the text. | |
| add_assignees | No | Logins, or "@me". | |
| add_reviewers | No | Logins, or org/team, to request a review from; they are notified. | |
| remove_closes | No | Issues to stop closing: the body's lines that are only a closing keyword and that issue are removed. A mention in a sentence or a commit message is left as it is, so the issue can stay linked. | |
| remove_labels | No | ||
| remove_assignees | No | ||
| remove_milestone | No | Take the pull request out of its milestone. | |
| remove_reviewers | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pr | Yes | ||
| url | Yes | ||
| repo | Yes | ||
| notes | Yes | What to know about the result; [] when nothing. | |
| errors | Yes | Failed steps, keyed by step (fields.<Field name>, blocked_by, kind, labels, milestone); {} when none. | |
| changed | Yes | The arguments that were applied. | |
| foreign | Yes | ||
| milestone | Yes | The milestone that was set; null when none was set or it was removed. | |
| attachments | Yes | The files that were sent; [] when none were given. | |
| closing_issues | No | The issues GitHub links as closed by the pull request now; only when add_closes or remove_closes was given. |