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.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
owner Repository owner — the user or organisation login. Supports {{ }}. | string | Yes | — | — | octocat |
repo Repository name, without the owner prefix. Supports {{ }}. | string | Yes | — | — | hello-world |
pull_number Pull request number as shown in the UI (not the internal id). | string | Yes | — | — | 1 |
merge_method How to merge. The repository must allow the method you pick. | string | No | merge | one of "merge", "squash", "rebase" | — |
commit_title Title of the merge commit. | string | No | — | — | — |
commit_message Body of the merge commit. | string | No | — | — | — |
sha Head SHA the PR must still be at; the merge is refused if it moved. | string | No | — | — | — |
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
| Field | Type | Example |
|---|---|---|
ok True when GitHub accepted the call. | boolean | true |
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.
Solutions with GitHub
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.