merge_pull_request
Merge an approved pull request into its base branch. Under the default-off independent-approval setting, an eligible author may explicitly approve their own PR when the user requests approval or adoption. When independent approval is enabled, an eligible actor other than the PR author must approve. Requires Owner role. style options: ‘merge’ (merge commit, default), ‘squash’ (squash into one commit), ‘rebase’ (rebase onto base branch).
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
model_name | Annotated[str, Field(description='Name of the Bridge Town model.')] | Yes | — | |
pull_request_id | Annotated[int, Field(description='Numeric ID of the pull request within the model.')] | Yes | — | |
style | Annotated[Literal['merge', 'rebase', 'squash'], Field(description="Merge style: 'merge' (merge commit), 'rebase' (rebase and merge), or 'squash' (squash and merge).")] | No | 'merge' | |
commit_title | Annotated[str, Field(description='Optional title for the merge commit.')] | No | '' | |
expected_head_sha | Annotated[str, Field(description='Optional SHA of the PR head commit for optimistic concurrency control.')] | No | '' | |
workspace_id | `Annotated[str | None, Field(description=WORKSPACE_ID_FIELD_DESCRIPTION)]` | No | None |
Returns
Section titled “Returns”Returns a structured object. Top-level fields:
model(string)pull_request_id(integer)merged(boolean)message(string)
See the response example below for the full payload shape.
Example
Section titled “Example”Tool Call
Section titled “Tool Call”{ "name": "merge_pull_request", "arguments": { "model_name": "forecasts", "pull_request_id": 42, "commit_title": "Merge: aggressive growth scenario", "style": "squash" }}Response
Section titled “Response”{ "model": "forecasts", "pull_request_id": 42, "merged": true, "message": "Pull request merged."}- Module:
Pull Requests - Requires an authenticated Bridge Town session (OAuth) or an API token.