List GitHub pull requests
Step
github-list-pullsreadLists a repository's pull requests, newest first, up to 100. Needs the token permission Pull requests Read.
At a glance
| Property | Value |
|---|---|
| Step name | github-list-pulls |
| Resource | ClusterStep (lumen.ai/v1alpha1) |
| Palette group, category | read, github |
| Credits | 0.2 credits each time it succeeds |
| Side effects | no |
| Installation must provide | nothing |
Inputs
| Property | Value |
|---|---|
| Needs | nothing |
| Produces | fields |
| Works on | item 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.
| Output | Type |
|---|---|
pulls | array |
count | number |
truncated | boolean |
Settings
Set under config: on the flow node. Text settings may contain {nodeId.field} placeholders.
| Setting | Type | Default | Description |
|---|---|---|---|
connectorRef | string | - | GitHub connectionminLength 1 |
reporequired | string | - | owner/name, such as acme/website.minLength 1; maxLength 200 |
state | string | "open" | Whichone of open, closed, all |
max | integer | 20 | Max 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
Was this page helpful?