Merge Pull Request

github.merge_pull_request
ActionBusiness appsconnection required

Calls the GitHub API PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge.

Merge a pull request with a merge commit, a squash or a rebase.

Connection

Required
Yes — the node will not save without one
Auth type
Bearer token
Providers
GitHub
Secret shape
the GitHub personal access token
Resolved by
config.connection_id, else node.connection_id, else the tenant's sole GitHub connection

Configuration

7 fields, 3 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.

FieldTypeRequiredDefaultConstraintsExample
owner
Repository owner — the user or organisation login. Supports {{ }}.
stringYes——octocat
repo
Repository name, without the owner prefix. Supports {{ }}.
stringYes——hello-world
pull_number
Pull request number as shown in the UI (not the internal id).
stringYes——1
merge_method
How to merge. The repository must allow the method you pick.
stringNomergeone of "merge", "squash", "rebase"—
commit_title
Title of the merge commit.
stringNo———
commit_message
Body of the merge commit.
stringNo———
sha
Head SHA the PR must still be at; the merge is refused if it moved.
stringNo———

Example configuration

Every value below is the contract’s own example or default — nothing invented.

{
  "merge_method": "merge",
  "owner": "octocat",
  "pull_number": "1",
  "repo": "hello-world"
}

Output

One shape.

result

FieldTypeExample
ok
True when GitHub accepted the call.
booleantrue
merged
True when the merge went through.
boolean—
sha
SHA of the resulting merge commit.
string—
message
GitHub's description of the outcome.
string—
{
  "merged": false,
  "message": "",
  "ok": true,
  "sha": ""
}

Notes

  • GitHub answers 405 when the pull request is not mergeable and 409 when the head SHA has moved — both surface as a failed step.

See Merge Pull Request run in a workflow.

In a technical demo we add the GitHub connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.