# Open a GitHub issue

> Opens an issue in a repository, with its labels and assignees. Needs the token permission Issues Read and write.

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

## At a glance

| Property | Value |
| --- | --- |
| **Step name** | `github-create-issue` |
| **Resource** | ClusterStep (`lumen.ai/v1alpha1`) |
| **Palette group, category** | save, github |
| **Credits** | **0.5** credits each time it succeeds |
| **Side effects** | yes: It changes something outside Lumen, so a retry asks first and a test shows what it would do instead of doing it. |
| **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](https://docs.go-lumen.ai/concepts/how-flows-run.md#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 |
| `url` | string |

## Settings

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

| Setting | Type | Default | Description |
| --- | --- | --- | --- |
| `connectorRef` | string |  | GitHub connection (minLength 1) |
| `repo` (required) | string |  | owner/name, such as acme/website. Needs the token permission Issues: Read and write. (minLength 1; maxLength 200) |
| `title` (required) | string |  | Title (minLength 1; maxLength 256) |
| `body` | string |  | Markdown. (maxLength 60000) |
| `labels` | list of string |  | Labels (maxItems 20) |
| `assignees` | list of string |  | Assignees (GitHub users) (maxItems 10) |

The full JSON Schema of these settings: [github-create-issue.schema.json](https://docs.go-lumen.ai/schemas/steps/github-create-issue.schema.json).

## Example

File a bug from a support email

```yaml title="config"
body: |-
  Reported by email:

  > {message}
labels:
- bug
- from-support
repo: acme/website
title: Checkout fails for {customer}
```

## Use it in a flow

A node that runs `github-create-issue` goes under `spec.nodes` of a [Flow](https://docs.go-lumen.ai/concepts/how-flows-run.md#the-flow-as-yaml). Give it any id, and list the next node ids in next.

```yaml title="flow.yaml"
apiVersion: lumen.ai/v1alpha1
kind: Flow
metadata:
  name: github-create-issue-example
  namespace: tenant-acme
spec:
  displayName: "Open a GitHub issue"
  triggers:
    - id: start
      ref: {name: manual-run}
      next: [github-create-issue]
  nodes:
    - id: github-create-issue
      stepRef: {name: github-create-issue}
      config:
        body: |-
          Reported by email:

          > {message}
        labels:
        - bug
        - from-support
        repo: acme/website
        title: Checkout fails for {customer}
```
