Get a GitHub issue or pull request
Step
github-get-issuereadReads an issue or pull request, with its labels, state and whether it was merged, for the steps after it.
At a glance
| Property | Value |
|---|---|
| Step name | github-get-issue |
| 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 |
|---|---|
repo | string |
number | number |
kind | string |
title | string |
body | string |
state | string |
labels | array |
author | string |
url | string |
merged | boolean |
draft | boolean |
createdAt | date |
updatedAt | date |
Settings
Set under config: on the flow node. Text settings may contain {nodeId.field} placeholders.
| Setting | Type | Default | Description |
|---|---|---|---|
connectorRef | string | - | GitHub connectionminLength 1 |
repo | string | - | owner/name, such as acme/website. Empty is the repository the flow started from.maxLength 200 |
number | string | - | Empty is the one the flow started from.maxLength 100 |
The full JSON Schema of these settings: github-get-issue.schema.json.
Example
Check a pull request a message names
config
number: '{pr}'
repo: acme/website
Use it in a flow
A node that runs github-get-issue 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-get-issue-example
namespace: tenant-acme
spec:
displayName: "Get a GitHub issue or pull request"
triggers:
- id: start
ref: {name: manual-run}
next: [github-get-issue]
nodes:
- id: github-get-issue
stepRef: {name: github-get-issue}
config:
number: '{pr}'
repo: acme/website
Was this page helpful?