• /
  • EnglishEspañolFrançais日本語한국어Português
  • Se connecterDémarrer

Lock a GitHub issue

|View as Markdown (English)

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

For authentication setup, see GitHub issue actions.

The following inputs are available for this action.

Input

Type

Description

Example

token

String

Required. 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

String

Required. The account owner of the repository (user or organization login). Case-insensitive.

"octocat"

repo

String

Required. Repository name without the .git suffix. Case-insensitive.

"Hello-World"

issueNumber

Int

Required. The number that identifies the issue.

1347

lockReason

String

Optional. 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

List

Optional. JQ selectors to extract values from the response.

This action returns the following outputs.

Output

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.

Workflow example

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
Droits d'auteur © 2026 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.