Skip to content
Proud to collaborate with Microsoft for Startups

github.pulls.merge_pr ​

Merge a GitHub pull request after the caller proves policy and approval requirements.

Merge a GitHub pull request after the caller proves policy and approval requirements.

Merges into the default branch are governed by the caller's approval receipt and skill policy, not by the default-branch guard. delete_head_branch never deletes a head branch that is, or cannot be ruled out as, the repository default branch.

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-github
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
organization_uuiduuidYes—Organization UUID
actorstringNo—Actor initiating the workflow
workflow_run_idstringNo—Parent workflow run id
dry_runbooleanNo—Validate and plan without mutating GitHub
github_connection_uuiduuidNo—GitHub installation connection UUID
repositorystringYes—Repository owner/name
pull_numberintegerYes—Pull request number
expected_head_shastringYes—Expected PR head SHA
merge_methodstringNo—merge, squash, or rebase
delete_head_branchbooleanNo—Delete the pull request head branch after a successful merge in this call
commit_titlestringNo—Merge commit title or squash title
commit_messagestringNo—Merge commit message or squash body
approval_receiptjsonYes—Approval/safety evidence from caller workflow

Output Schema ​

FieldTypeRequiredDefaultDescription
statusstringNo—planned, merged, already_merged, or failed
repositorystringNo——
pull_numberintegerNo——
merge_methodstringNo——
mergedbooleanNo——
merge_commit_shastringNo——
head_branch_deletedbooleanNo——
head_branchstringNo——
html_urlstringNo——
appliedbooleanNo——
dry_runbooleanNo——
warningslistNo——
failure_reasonstringNo——
failed_stepstringNo——
failed_layerstringNo——
failed_at_statestringNo——
errorstringNo——
error_typestringNo——
failed_atstringNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—execute—
completedNoYesYes——
failedNoYesNo——

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecutecompleted—
* (any state)failfailed—

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "github.pulls.merge_pr",
  "initial_data": {
    "organization_uuid": "value",
    "repository": "value",
    "pull_number": 123,
    "expected_head_sha": "value"
  }
}