Saltar al contenido principal

Get a GitHub issue or pull request

Pasogithub-get-issueread

Reads an issue or pull request, with its labels, state and whether it was merged, for the steps after it.

De un vistazo​

PropiedadValor
Nombre del pasogithub-get-issue
RecursoClusterStep (lumen.ai/v1alpha1)
Grupo de la paleta, categoríaread, github
Créditos0.2 créditos cada vez que tiene éxito
Efectos externosno
La instalación debe aportarnada

Entradas​

PropiedadValor
Necesitanada
Producefields
Trabaja sobreitem un documento cada vez

Necesita y Produce son tipos de datos (file, text, fields, email). El editor ofrece un paso solo donde lo que necesita ya está en el camino. Consulta Documentos y datos.

Salidas​

Un nodo posterior se refiere a una salida como {nodeId.field} en un texto, o nodeId.field en una condición.

SalidaTipo
repostring
numbernumber
kindstring
titlestring
bodystring
statestring
labelsarray
authorstring
urlstring
mergedboolean
draftboolean
createdAtdate
updatedAtdate

Ajustes​

Se definen bajo config: en el nodo del flujo. Los ajustes de texto pueden contener marcadores de posición como {nodeId.field}.

AjusteTipoValor por defectoDescripción
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

El JSON Schema completo de estos ajustes: github-get-issue.schema.json.

Ejemplo​

config
number: '{pr}'
repo: acme/website

Úsalo en un flujo​

Un nodo que ejecuta github-get-issue va bajo spec.nodes de un Flow. Dale cualquier id y enumera en next los ids de los nodos siguientes.

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