Lock, pin, move and delete issues
A thread turns heated, an important issue gets lost in the list, a bug lands in the wrong repository, or spam shows up. You want to fix each one in a few clicks, on the issue page or in a terminal.
Each step below works on its own. Do only the steps that you need.
| You want to | Who can |
|---|---|
| Lock or unlock a conversation | People with write access |
| Pin or unpin an issue | People with write access |
| Move an issue to another repository | People with write access to both repositories |
| Make a branch for an issue | People with write access |
| Delete an issue | Admins |
Write access means the write, maintain or admin role. The triage role can label and assign people, but it cannot do these actions. To give an issue an owner, see Assign people to issues and pull requests.
1. Lock a heated conversation
On the web:
- Open the issue.
- In the sidebar, click Lock conversation.
- In Reason (optional), pick a reason, or keep No reason.
- Click Lock conversation.
In a terminal:
src issue lock 12 --reason too_heated
src issue unlock 12
- A reason is
off_topic,resolved,spamortoo_heated. - Everyone who can read the issue still reads it. Only people with write access can comment.
- Agents and CI jobs cannot comment on a locked conversation, whatever their role.
- To unlock on the web, click Unlock conversation in the sidebar.
- A pull request locks the same way: the same button in its sidebar, or
src pr lock 7.
2. Pin an important issue
On the web, open the issue, then click Pin issue in the sidebar.
In a terminal:
src issue pin 12
src issue unpin 12
- The pinned issues show above the issues list, under Pinned issues. They do not show while you search or filter by a label.
- A repository has at most 3 pinned issues. Unpin one before you pin a fourth.
- Only issues can be pinned, not pull requests.
3. Move an issue to the right repository
On the web:
- Open the issue.
- In the sidebar, click Transfer issue.
- In Repository, pick the repository. The list shows the other repositories of the same owner that you can write to.
- Click Transfer issue.
The forge then opens the issue at its new place.
In a terminal:
src issue transfer 12 acme/docs
src prints the URL of the issue at its new place.
What moves with the issue:
- The comments.
- The labels whose names the other repository has.
- The assignees who can read the other repository.
The issue gets a new number in the other repository. Its old link and its old number lead to the new place, for each person who can read it there.
The forge does not move:
- An issue to a repository of another owner.
- An issue from a private repository to a public repository.
- A pull request.
- An issue that screening holds, or an issue that syncs with GitHub.
4. Start a branch from an issue
On the web:
- Open the issue.
- In the sidebar, next to Development, click Create.
- If you want a name of your own, type it in Branch name (optional). Without a name, the forge names the branch from the issue number and title.
- If the branch must start from a branch other than the default branch, type that branch in Start from (optional).
- Click Create branch.
The sidebar then shows the commands that check out the branch.
In a terminal, in your clone:
src issue develop 12 --checkout
--checkoutfetches the new branch and checks it out.--name fix-loginsets the name of the branch.--base releasesets the branch to start from.src issue develop 12 --listlists the branches of the issue.
5. Delete spam
Only admins delete issues. A deleted issue does not come back.
On the web:
- Open the issue.
- In the sidebar, click Delete issue.
- In the dialog, click Delete issue.
In a terminal:
src issue delete 12 --yes
- The issue and its comments go for good. Its number is never used again.
- Only issues can be deleted, not pull requests.
srcnever asks a question, so it needs--yes.- To stop the account that posts the spam, ban it. See the factory and bans.
What works at the end
- A locked issue says why it is locked, and only people with write access comment on it.
- Up to 3 pinned issues show at the top of the issues list.
- A moved issue opens at its new place, also from its old link.
- The sidebar of an issue lists its branches under Development.
- The timeline of the issue shows who locked, pinned or moved it.
Later: REST and MCP
An agent or a script does the same work over REST or MCP, with the same rules. The REST paths are under /api/v1/repos/{owner}/{repo}.
| You want to | REST | MCP tool |
|---|---|---|
| Lock or unlock | PUT or DELETE /issues/{n}/lock, with { "reason" } | lock_issue, unlock_issue |
| Pin or unpin | PUT or DELETE /issues/{n}/pin | pin_issue, unpin_issue |
| Move | POST /issues/{n}/transfer, with { "repo": "acme/docs" } | transfer_issue |
| List or make branches | GET or POST /issues/{n}/branches, with { "name", "base" } | list_issue_branches, create_issue_branch |
| Delete | DELETE /issues/{n} | delete_issue |
After a move, GET /issues/{n} at the old place answers 301 with the new place. Use the REST API has the other routes.