Skip to content
Proud to collaborate with Microsoft for Startups

github.pulls.create_pr ​

Create a GitHub pull request

Create a pull request on a GitHub repository.

Inputs:

  • owner: Repository owner (required).
  • repo: Repository name (required).
  • title: PR title (required).
  • head: Source branch name (required), e.g. feature/my-feature.
  • base: Target branch name (required), e.g. main.
  • body: PR description in markdown (optional).
  • draft: Open as a draft PR (optional, default: false).

Outputs (terminal state_data):

  • pr_number: int — pull request number
  • pr_url: str — HTML URL of the PR
  • state: str — open | closed

Plugin required: context.get_plugin("github") must expose .token.

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-github
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
ownerstringYes—Repository owner
repostringYes—Repository name
titlestringYes—PR title
headstringYes—Source branch, e.g. feature/my-feature
basestringYes—Target branch, e.g. main
bodystringNo—PR description in markdown
draftbooleanNo—Open as a draft PR (default: false)

Output Schema ​

FieldTypeRequiredDefaultDescription
pr_numberintegerNo——
pr_urlstringNo——
statestringNo——
basestringNo——
bodystringNo——
draftbooleanNo——
headstringNo——
ownerstringNo——
repostringNo——
titlestringNo——
failure_reasonstringNo——
failure_typestringNo——
failed_actionstringNo——
failed_at_statestringNo——
failed_stepstringNo——
failed_layerstringNo——
errorstringNo——
error_typestringNo——

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.create_pr",
  "initial_data": {
    "owner": "value",
    "repo": "value",
    "title": "value",
    "head": "value"
  }
}