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 ​
| Property | Value |
|---|---|
| Workflow type | Atomic |
| Library | App-github |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
owner | string | Yes | — | Repository owner |
repo | string | Yes | — | Repository name |
pr_number | integer | Yes | — | Pull request number |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
base_branch | string | No | — | — |
body | string | No | — | — |
head_branch | string | No | — | — |
merged | boolean | No | — | — |
pr_number | integer | No | — | — |
pr_url | string | No | — | — |
state | string | No | — | — |
title | string | No | — | — |
owner | string | No | — | — |
repo | string | No | — | — |
failure_reason | string | No | — | — |
failure_type | string | No | — | — |
failed_action | string | No | — | — |
failed_at_state | string | No | — | — |
failed_step | string | No | — | — |
failed_layer | string | No | — | — |
error | string | No | — | — |
error_type | string | No | — | — |
States ​
| State | Initial | Terminal | Success | Auto-advance | Description |
|---|---|---|---|---|---|
pending | Yes | No | — | execute | — |
completed | No | Yes | Yes | — | — |
failed | No | Yes | No | — | — |
State Diagram ​
Transitions ​
| From | Action | To | Description |
|---|---|---|---|
pending | execute | completed | — |
* (any state) | fail | failed | — |
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
}
}