Skip to content
Proud to collaborate with Microsoft for Startups

github.pulls.list_prs ​

List pull requests for a GitHub repository

List pull requests for a GitHub repository.

Inputs:

  • owner: Repository owner (required).
  • repo: Repository name (required).
  • state: Filter by PR state — open | closed | all (optional, default: open).

Outputs (terminal state_data):

  • pull_requests: list[dict] — each with pr_number, title, state, head_branch, base_branch, pr_url, draft.
  • count: int — number of pull requests returned.

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
statestringNo—PR state filter: open
organization_uuiduuidNo—Optional organization context

Output Schema ​

FieldTypeRequiredDefaultDescription
pull_requestslistNo——
countintegerNo——
ownerstringNo——
repostringNo——
statestringNo——
organization_uuiduuidNo——
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.list_prs",
  "initial_data": {
    "owner": "value",
    "repo": "value"
  }
}