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

Locks a GitHub issue, restricting who can add new comments.

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`                               |
| **lockReason**  | Optional    | String | The reason for locking the issue. The lock will fail if you use a value other than the allowed values. Allowed values: `off-topic`, `too heated`, `resolved`, `spam`.    | `"resolved"`                         |
| **selectors**   | Optional    | List   | JQ selectors to extract values from the response.                                                                                                                        |                                      |

## Outputs

This action returns the following outputs.

| Output Field     | Type    | Example                                      |
| ---------------- | ------- | -------------------------------------------- |
| **response**     | Empty   | Empty response body (HTTP 204 No Content).   |
| **success**      | Boolean | `success: true | false`                      |
| **errorMessage** | String  | Contains the GitHub API error response body. |

## Example

| Workflow example                                                                                                                                                                                                                                                                                                                                      |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ```yaml name: github_lock_issue_workflow description: Lock a GitHub issue steps:   - name: lock_issue     type: action     action: gitHub.issue.lock     version: 1     inputs:       token: ${{ :secrets:github-PAT-token }}       owner: your_user_name       repo: test-workflow       issueNumber: 7       lockReason: resolved     next: end ``` |
