Skip to content

create_pull_request

Open a merge request (pull request) from head_branch into base_branch. Use this to start a team review workflow before merging a scenario branch. Requires at least Editor role. Returns: id (int) — PR number; title (str) — PR title; state (str) — always ‘open’ on creation; head_branch (str) — source branch; base_branch (str) — target branch; author (str) — creator login; created_at (str) — ISO timestamp; merged (bool) — always false on creation.

NameTypeRequiredDefaultDescription
project_nameAnnotated[str, Field(description='Name of the Bridge Town project.')]Yes
titleAnnotated[str, Field(description='Title for the pull request.')]Yes
head_branchAnnotated[str, Field(description='Branch containing the changes to merge.')]Yes
base_branchAnnotated[str, Field(description="Target branch to merge into (typically 'main').")]No'main'
bodyAnnotated[str, Field(description='Optional description or context for the pull request.')]No''

Returns a structured object. Top-level fields:

  • id (integer)
  • project (string)
  • title (string)
  • head_branch (string)
  • base_branch (string)
  • state (string)
  • url (string)

See the response example below for the full payload shape.

{
"name": "create_pull_request",
"arguments": {
"project_name": "forecasts",
"title": "Aggressive growth scenario",
"head_branch": "scenario/aggressive-growth",
"base_branch": "main",
"body": "Bumps growth_rate from 10% to 15%."
}
}
{
"id": 42,
"project": "forecasts",
"title": "Aggressive growth scenario",
"head_branch": "scenario/aggressive-growth",
"base_branch": "main",
"state": "open",
"url": "https://app.bridgetown.example/acme/forecasts/pull/42"
}
  • Module: Pull Requests
  • Requires authentication via API token or Auth0 JWT.