Skip to content
Proud to collaborate with Microsoft for Startups

github.pulls.get_pr ​

Get details for a GitHub pull request

Get details for a single GitHub pull request.

Inputs:

  • owner: Repository owner (required).
  • repo: Repository name (required).
  • pr_number: Pull request number (required).

Outputs (terminal state_data):

  • pr_number: int
  • title: str
  • state: str — open | closed
  • merged: bool
  • head_branch: str — source branch
  • base_branch: str — target branch
  • pr_url: str
  • body: str | None — PR description

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
pr_numberintegerYes—Pull request number

Output Schema ​

FieldTypeRequiredDefaultDescription
base_branchstringNo——
bodystringNo——
head_branchstringNo——
mergedbooleanNo——
pr_numberintegerNo——
pr_urlstringNo——
statestringNo——
titlestringNo——
ownerstringNo——
repostringNo——
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.get_pr",
  "initial_data": {
    "owner": "value",
    "repo": "value",
    "pr_number": 123
  }
}