---
title: Create a GitHub issue
source: https://docs.newrelic.com/docs/workflow-automation/setup-and-configure/actions-catalog/github/github-issue-create
---

Creates a new issue in a GitHub repository.

For authentication setup, see [GitHub issue actions](https://docs.newrelic.com/docs/workflow-automation/setup-and-configure/actions-catalog/github/github-issue).

## Inputs

The following inputs are available for this action.

| Input Field          | Optionality | Type   | Description                                                                                                                                                                                                                                                              | Example                                              |
| -------------------- | ----------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------- |
| **token**            | Required    | String | GitHub Personal Access Token (fine-grained or classic) stored as a secret. Fine-grained PATs require Issues: Read and write permission. Classic PATs require repo scope.                                                                                                 | `"${{ :secrets:github-PAT-token }}"`                 |
| **owner**            | Required    | String | The account owner of the repository (user or organization login). Case-insensitive.                                                                                                                                                                                      | `"octocat"`                                          |
| **repo**             | Required    | String | Repository name without the .git suffix. Case-insensitive.                                                                                                                                                                                                               | `"Hello-World"`                                      |
| **title**            | Required    | String | The title of the issue.                                                                                                                                                                                                                                                  | `"Production issue detected"`                        |
| **body**             | Optional    | String | Issue body in GitHub-flavored Markdown. Omitted from the request if empty.                                                                                                                                                                                               | `"Steps to reproduce: ..."`                          |
| **assignees**        | Optional    | List   | GitHub usernames to assign. Requires push access on the token. The GitHub API silently drops users without push access.                                                                                                                                                  | `["octocat"]`                                        |
| **labels**           | Optional    | List   | Labels to attach. Requires push access on the token. The API auto-creates unknown labels if you have permission. Otherwise, the API rejects them.                                                                                                                        | `["incident", "p1"]`                                 |
| **milestone**        | Optional    | Int    | The milestone number (integer ID, not the title). Requires push access on the token. The milestone must already exist in the repository.                                                                                                                                 | `3`                                                  |
| **type**             | Optional    | String | The name of the issue type to associate with this issue (for example, Bug, Task, Feature). Requires push access. Issue types must be configured at the repository or organization level before use.                                                                      | `"Bug"`                                              |
| **issueFieldValues** | Optional    | List   | Issue field values for GitHub Projects v2 custom fields. Each object must include `field_id` (integer) and `value` (string, number, or array for multi-select fields). Only available for organization-owned repositories with GitHub Projects v2 custom fields enabled. | `[{"field_id": 1, "value": "high"}]`                 |
| **selectors**        | Optional    | List   | JQ selectors to extract values from the response.                                                                                                                                                                                                                        | `[{"name": "issueNumber", "expression": ".number"}]` |

## Outputs

This action returns the following outputs.

| Output Field     | Type    | Example                                                                                                                                                                                                                                                                                   |
| ---------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **response**     | Object  | ```yaml {   "id": 1,   "number": 1347,   "state": "open",   "title": "Found a bug",   "html_url": "https://github.com/octocat/Hello-World/issues/1347",   "body": "I'm having a problem with this.",   "created_at": "2011-04-22T13:33:48Z",   "updated_at": "2011-04-22T13:33:48Z" } ``` |
| **success**      | Boolean | `success: true | false`                                                                                                                                                                                                                                                                   |
| **errorMessage** | String  | Contains the GitHub API error response body.                                                                                                                                                                                                                                              |

## Example

| Workflow example                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| ```yaml name: github_create_issue_workflow description: Create a GitHub issue steps:   - name: create_issue     type: action     action: gitHub.issue.create     version: 1     inputs:       token: ${{ :secrets:github-PAT-token }}       owner: your_user_name       repo: test-workflow       title: Production issue detected       body: An issue has been detected and needs investigation.       assignees:         - your_user_name       labels:         - incident       milestone: 3     next: end ``` |
