Skip to main content

List GitHub pull requests

Stepgithub-list-pullsread

Lists a repository's pull requests, newest first, up to 100. Needs the token permission Pull requests Read.

At a glance​

PropertyValue
Step namegithub-list-pulls
ResourceClusterStep (lumen.ai/v1alpha1)
Palette group, categoryread, github
Credits0.2 credits each time it succeeds
Side effectsno
Installation must providenothing

Inputs​

PropertyValue
Needsnothing
Producesfields
Works onitem one document at a time

Needs and Produces are data types (file, text, fields, email). The editor offers a step only where what it needs is already on the path. See Documents and data.

Outputs​

A later node references an output as {nodeId.field} in text, or nodeId.field in a condition.

OutputType
pullsarray
countnumber
truncatedboolean

Settings​

Set under config: on the flow node. Text settings may contain {nodeId.field} placeholders.

SettingTypeDefaultDescription
connectorRefstring-GitHub connectionminLength 1
reporequiredstring-owner/name, such as acme/website.minLength 1; maxLength 200
statestring"open"Whichone of open, closed, all
maxinteger20Max caps the pull requests returned: 1 to 100, default 20.minimum 1; maximum 100

The full JSON Schema of these settings: github-list-pulls.schema.json.

Example​

Open pull requests for a weekly summary

config
max: 10
repo: acme/website
state: open

Use it in a flow​

A node that runs github-list-pulls goes under spec.nodes of a Flow. Give it any id, and list the next node ids in next.

flow.yaml
apiVersion: lumen.ai/v1alpha1
kind: Flow
metadata:
name: github-list-pulls-example
namespace: tenant-acme
spec:
displayName: "List GitHub pull requests"
triggers:
- id: start
ref: {name: manual-run}
next: [github-list-pulls]
nodes:
- id: github-list-pulls
stepRef: {name: github-list-pulls}
config:
max: 10
repo: acme/website
state: open