In this guide

Update a Pull Request

Edit the title or description, close it, or reopen it.

Action referenceChange

What this action does #

First, connect GitHub in Services. Then open Actions → + → GitHub and choose Update a Pull Request.

What a run does

Running or testing this action changes something in your connected service.

More about this action

Send only what should change. State closed closes without merging; open reopens it, unless the branch has since been deleted.

As with issues, the REST API cannot delete a pull request — closing is the whole of delete, and a closed pull request stays visible. To clean up afterwards, Delete a Branch removes the branch it came from.

Base can be changed to retarget the pull request at a different branch. Head cannot.

Inputs to fill in #

Open an input to choose its value. Keep a fixed value with Text, receive it from Shortcuts, ask when the action runs, or use an Earlier Step. Read how input sources work.

Owner

RequiredText

User or organisation.

This input offers a picker for repository from your connected account. You can also supply its value directly.

Example value (replace with your own):
octocat

Repository

RequiredText

Name only, without the owner and without .git.

This input offers a picker for repository from your connected account. You can also supply its value directly.

Example value (replace with your own):
Hello-World

Pull Request Number

RequiredWhole number

The number shown in the interface.

This input offers a picker for pull request from your connected account. You can also supply its value directly.

Example value (replace with your own):
7

Title

OptionalText

Replaces the existing title.

Description

OptionalText

Replaces the whole description. Markdown.

State

OptionalChoice

Supply a choice value for this input.

Choices: open, closed

Into Branch

OptionalText

Retarget at a different branch.

This input offers a picker for branch from your connected account. You can also supply its value directly.

Example value (replace with your own):
main

Maintainers Can Edit

OptionalOn or off

Only meaningful when the source is a fork.

What comes back #

In the action editor, open Output → Returned Value to choose fields for your shortcut. These are the response fields described by the app; a service may omit an optional field or return an empty list. JSON File contains the full response.

Returned fieldTypeMeaning
numberintegerThe number shown in the UI.
idintegerWhole-number value.
titlestringText value.
statestringopen or closed. A merged pull request is closed.
draftbooleanTrue or false.
merged_atstringNull unless it was merged — the way to tell merged from simply closed.
bodystringThe description, as Markdown.
html_urlstringThe pull request page.
created_atstringISO 8601.
updated_atstringText value.
closed_atstringText value.
userobjectWho opened it.
user.loginstringUsername.
user.idintegerWhole-number value.
user.html_urlstringTheir profile page.
user.avatar_urlstringText value.
user.typestringUser, Organization or Bot.
assigneesarrayA list of values.
assignees[].loginstringUsername.
assignees[].idintegerWhole-number value.
assignees[].html_urlstringTheir profile page.
assignees[].avatar_urlstringText value.
assignees[].typestringUser, Organization or Bot.
requested_reviewersarrayReview requests still outstanding.
requested_reviewers[].loginstringUsername.
requested_reviewers[].idintegerWhole-number value.
requested_reviewers[].html_urlstringTheir profile page.
requested_reviewers[].avatar_urlstringText value.
requested_reviewers[].typestringUser, Organization or Bot.
labelsarrayA list of values.
labels[].namestringText value.
labels[].colorstringText value.
headobjectWhere the changes come from.
head.refstringBranch name.
head.shastringLatest commit on that branch.
head.labelstringowner:branch.
baseobjectWhere they are going.
base.refstringBranch name.
base.shastringText value.

Run it from Shortcuts #

  1. Give the action a recognizable name and tap Save.
  2. In Apple Shortcuts, add Shortcutify’s Execute Action and select the saved action.
  3. Supply any Param or File slots you bound in the inputs, then run the shortcut.

If the result is unexpected, open Logs in Shortcutify, select the run, and inspect this step’s inputs and response.

Advanced reference #

Request, permissions, and identifiers

Request: PATCH https://api.github.com/repos/{owner}/{repo}/pulls/{pull_number}

Action identifier: github.pulls.update.v1

Permissions declared for this action: pull_requests:write. The account’s own access rules also apply.

InputRequest keyLocation
Ownerownerpath
Repositoryrepopath
Pull Request Numberpull_numberpath
Titletitlebody
Descriptionbodybody
Statestatebody
Into Branchbasebody
Maintainers Can Editmaintainer_can_modifybody

GitHub API reference