In this guide

Lock an Issue

Stop anyone but collaborators commenting.

Action referenceChange

What this action does #

First, connect GitHub in Services. Then open Actions → + → GitHub and choose Lock an Issue.

What a run does

Running or testing this action changes something in your connected service.

More about this action

Locking hides nothing and deletes nothing; it only refuses new comments from people without write access. Answers 204 with no body, so an action built on it has nothing to return — the run either succeeded or reported an error.

Inputs to fill in #

Open an input to choose its value. Keep a fixed value with Text, receive it from Shortcuts, ask when the action runs, or use an Earlier Step. Read how input sources work.

Owner

RequiredText

User or organisation.

This input offers a picker for repository from your connected account. You can also supply its value directly.

Example value (replace with your own):
octocat

Repository

RequiredText

Name only, without the owner and without .git.

This input offers a picker for repository from your connected account. You can also supply its value directly.

Example value (replace with your own):
Hello-World

Issue Number

RequiredWhole number

The number shown in the interface, not the internal id.

This input offers a picker for issue from your connected account. You can also supply its value directly.

Example value (replace with your own):
42

Reason

OptionalChoice

Optional, and shown in the issue timeline.

Choices: off-topic, too heated, resolved, spam

What comes back #

The app does not declare selectable response fields for this action. A successful operation may return no content. Inspect the run in Logs to see the service’s response.

Run it from Shortcuts #

  1. Give the action a recognizable name and tap Save.
  2. In Apple Shortcuts, add Shortcutify’s Execute Action and select the saved action.
  3. Supply any Param or File slots you bound in the inputs, then run the shortcut.

If the result is unexpected, open Logs in Shortcutify, select the run, and inspect this step’s inputs and response.

Advanced reference #

Request, permissions, and identifiers

Request: PUT https://api.github.com/repos/{owner}/{repo}/issues/{issue_number}/lock

Action identifier: github.issues.lock.v1

Permissions declared for this action: issues:write. The account’s own access rules also apply.

InputRequest keyLocation
Ownerownerpath
Repositoryrepopath
Issue Numberissue_numberpath
Reasonlock_reasonbody

GitHub API reference