Skip to main content

Comment on GitHub

Stepgithub-commentnotifyside effects

Comments on an issue or pull request. A step run again does not comment twice. Needs the token permission Issues (or Pull requests) Read and write.

At a glance​

PropertyValue
Step namegithub-comment
ResourceClusterStep (lumen.ai/v1alpha1)
Palette group, categorynotify, github
Credits0.5 credits each time it succeeds
Side effectsyes It changes something outside Lumen, so a retry asks first and a test shows what it would do instead of doing it.
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
repostring
numbernumber
commentIdstring
commentUrlstring

Settings​

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

SettingTypeDefaultDescription
connectorRefstring-GitHub connectionminLength 1
repostring-owner/name, such as acme/website. Empty is the repository the flow started from.maxLength 200
numberstring-Empty is the one the flow started from.maxLength 100
bodyrequiredstring-Markdown. Needs the token permission Issues (or Pull requests): Read and write.minLength 1; maxLength 60000

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

Example​

Thank a contributor

config
body: Thanks @{author}, we will look at this today.

Use it in a flow​

A node that runs github-comment 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-comment-example
namespace: tenant-acme
spec:
displayName: "Comment on GitHub"
triggers:
- id: start
ref: {name: manual-run}
next: [github-comment]
nodes:
- id: github-comment
stepRef: {name: github-comment}
config:
body: Thanks @{author}, we will look at this today.