# Get a GitHub issue or pull request

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

Source: https://docs.go-lumen.ai/es/reference/steps/github-get-issue

## De un vistazo

| Propiedad | Valor |
| --- | --- |
| **Nombre del paso** | `github-get-issue` |
| **Recurso** | ClusterStep (`lumen.ai/v1alpha1`) |
| **Grupo de la paleta, categoría** | read, github |
| **Créditos** | **0.2** créditos cada vez que tiene éxito |
| **Efectos externos** | no |
| **La instalación debe aportar** | nada |

## Entradas

| Propiedad | Valor |
| --- | --- |
| **Necesita** | nada |
| **Produce** | `fields` |
| **Trabaja sobre** | item: 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](https://docs.go-lumen.ai/es/concepts/how-flows-run.md#documents-and-data).

## Salidas

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

| Salida | Tipo |
| --- | --- |
| `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 |

## Ajustes

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

| Ajuste | Tipo | Valor por defecto | Descripción |
| --- | --- | --- | --- |
| `connectorRef` | string |  | GitHub connection (minLength 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) |

El JSON Schema completo de estos ajustes: [github-get-issue.schema.json](https://docs.go-lumen.ai/schemas/steps/github-get-issue.schema.json).

## Ejemplo

```yaml title="config"
number: '{pr}'
repo: acme/website
```

## Úsalo en un flujo

Un nodo que ejecuta `github-get-issue` va bajo `spec.nodes` de un [Flow](https://docs.go-lumen.ai/es/concepts/how-flows-run.md#the-flow-as-yaml). Dale cualquier id y enumera en next los ids de los nodos siguientes.

```yaml title="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
```
