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

Retrieves a single issue from a GitHub repository by issue number.

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"`                                    |
| **issueNumber** | Required    | Int    | The number that identifies the issue.                                                                                                                                    | `1347`                                             |
| **selectors**   | Optional    | List   | JQ selectors to extract values from the response.                                                                                                                        | `[{"name": "issueState", "expression": ".state"}]` |

## 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_get_issue_workflow description: Get a GitHub issue steps:   - name: get_issue     type: action     action: gitHub.issue.get     version: 1     inputs:       token: ${{ :secrets:github-PAT-token }}       owner: your_user_name       repo: test-workflow       issueNumber: 7     next: end ``` |
