You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add new flags gh issue create --[blocked-by/blocking] and gh issue edit --[add/remove]-[blocked-by/blocking] #11757
Describe the feature or problem you’d like to solve
Currently, the only way to change issue dependencies (i.e. the blocked-by/blocking status of one issue regarding another) is via the web interface. It would be helpful to be able to use this feature through the gh cli tool.
Proposed solution
Add the following new flags to gh issue create:
--blocked-by [number] to mark the specified issue as blocking the issue being created.
--blocking [number] to mark the issue being created as blocking the specified issue.
Add the following new flags to gh issue edit:
--add-blocked-by [number] and --remove-blocked-by [number] to (un)mark the specified issue as blocking the issue being edited.
--add-blocking [number] and --remove-blocking [number] to (un)mark the issue being edited as blocking the specified issue.
Thank you for your issue! We have categorized it as a feature request, and it has been added to our backlog. In doing so, we are not committing to implementing this feature at this time, but, we will consider it for future releases based on community feedback and our own product roadmap.
Unless you see the
help wantedContributions welcome
label, we are not currently looking for external contributions for this feature.
If you come across this issue and would like to see it implemented, please add a thumbs up! This will help us prioritize the feature. Please only comment if you have additional information or viewpoints to contribute.
I can see adding the support for blocking relationship provides value to the users. However, we need to dig a bit into it and see how the experience should look like.
Note
I'm going to cover both issues (i.e. this and #12152) here as they're closely related.
API support
As of now (November 2025), issues blocking/blocked-by relationship is only supported on github.com (i.e. not GHES). This means the implementation must perform feature detection to avoid hitting missing API endpoints. This applies to both REST and GraphQL endpoints.
Both GraphQL and REST APIs support this feature via the following endpoints:
Mutation addBlockedBy: adds a blocking/blocked-by association.
Mutation removeBlockedBy: removes a blocking/blocked-by association.
Few remarks:
The API endpoints only accept issue IDs (i.e. databaseId which is globally unique number). This is perhaps to support cross-repo relationships with a simple interface.
The association is only supported between issues (not PRs). This results in an implementation challenge, explained later on.
The API endpoints do not support batch operations. The caller has to repeat it if they're adding more than one association. In rare cases, where a user wants to add a large number of associations, they may get rate-limiter errors, resulting in an ill state.
CLI experience
This feature applies to issue create, issue edit and issue view commands.
1. issue create
Interactive
Warning
Providing interactive support for this feature is challenging. I mean, just prompting for issue numbers/URLs doesn't yield much value. As a user I'd prefer to see a list of issues that I can pick (like the web GUI), and this obviously is not easy to implement. Let alone the fact that GUI does allow you to pick issues from other repositories.
Non-interactive
With these repeatable options:
--blocked-by <NUMBER | URL | REFERENCE>
--blocking <NUMBER | URL | REFERENCE>
The arguments can be either:
An number (not ID) resolving to an issue (not PR) in the same repo that the new issue is being created in.
A URL resolving to an issue (not PR) to support cross-repo associations.
A reference in the owner/repo#number format to support cross-repo associations.
2. issue edit
Interactive
Warning
The same challenge as above.
Non-interactive
With these repeatable options:
--add-blocked-by <NUMBER | URL | REFERENCE>
--add-blocking <NUMBER | URL | REFERENCE>
--remove-blocked-by <NUMBER | URL | REFERENCE>
--remove-blocking <NUMBER | URL | REFERENCE>
3. issue view
Interactive
Currently, we don't show closing PRs in the interactive view, so we might want to keep the same behaviour for blocking/blocked-by associations. If not, we can display two group of URLs/references; blocking and blocked-by.
Non-interactive; plain (e.g. piped output)
issue view currently prints a minimal machine readable output like this:
title: foo
state: OPEN
author: johndoe
labels: foo, bar, baz
comments: 4
assignees:
projects:
milestone:
number: 99999
--
[BODY]
Feature detection: As noted above, the feature is only available on github.com. So feature detection is necessary.
Shared code with pr commands:issue create and issue edit reuse some components from pr commands to supply metadata of the subject "issue". Since the API only supports the association between issues, we'd have to handle this separately in issue commands. I don't know if there's any plan to support such associations with PRs, but if there'll be such a thing, then we'd probably have to go through refactoring and making things reusable.
Complicated interactive flow: Displaying a dynamic list of issues to pick from is kind of new to gh and needs careful design, especially regarding accessibility.
Notes for the team
It's a nice addition, but at the same time a complicated one. See the short list of the challenges just above this.
It also seems to be the issue that there is no API for getting all blocked/blocking issues (like you can in web search), best I could find is to iterate over all issues and checking if they return a non-empty array, which is really suboptimal for large repositories.
Reacted by Babak K. Shandiz, Noboru Sugiyama and Nadav Timor
Issue relationship flags are in progress, covering --blocked-by/--blocking on create, and --add-blocked-by/--remove-blocked-by/--add-blocking/--remove-blocking on edit. The full design is up for review at #13120. If you have feedback on the proposed flags or behavior, please comment there!
Activity
github-actions commentedon Sep 17, 2025
Thank you for your issue! We have categorized it as a feature request, and it has been added to our backlog. In doing so, we are not committing to implementing this feature at this time, but, we will consider it for future releases based on community feedback and our own product roadmap.
Unless you see the help wantedContributions welcome
label, we are not currently looking for external contributions for this feature.
If you come across this issue and would like to see it implemented, please add a thumbs up! This will help us prioritize the feature. Please only comment if you have additional information or viewpoints to contribute.
babakks commentedon Nov 17, 2025
Thanks for your feedback, @Next-Door-Tech and @dkaszews! 🙏
I can see adding the support for blocking relationship provides value to the users. However, we need to dig a bit into it and see how the experience should look like.
Note
I'm going to cover both issues (i.e. this and #12152) here as they're closely related.
API support
As of now (November 2025), issues blocking/blocked-by relationship is only supported on
github.com(i.e. not GHES). This means the implementation must perform feature detection to avoid hitting missing API endpoints. This applies to both REST and GraphQL endpoints.Both GraphQL and REST APIs support this feature via the following endpoints:
REST API:
GET /repos/OWNER/REPO/issues/NUMBER/dependencies/blocked_by: returns the list of issues blockingOWNER/REPO#NUMBER.GET /repos/OWNER/REPO/issues/NUMBER/dependencies/blocking: returns the list of issues blocked byOWNER/REPO#NUMBER.POST /repos/OWNER/REPO/issues/NUMBER/dependencies/blocked_by: adds a blocking/blocked-by association.DELETE /repos/OWNER/REPO/issues/NUMBER/dependencies/blocked_by/BLOCKING_NUMBER: removes a blocking/blocked-by association.GraphQL:
repository.issue.blockedBy: returns the list of blocking issues.repository.issue.blocking: returns the list of blocked issues.addBlockedBy: adds a blocking/blocked-by association.removeBlockedBy: removes a blocking/blocked-by association.Few remarks:
databaseIdwhich is globally unique number). This is perhaps to support cross-repo relationships with a simple interface.CLI experience
This feature applies to
issue create,issue editandissue viewcommands.1.
issue createInteractive
Warning
Providing interactive support for this feature is challenging. I mean, just prompting for issue numbers/URLs doesn't yield much value. As a user I'd prefer to see a list of issues that I can pick (like the web GUI), and this obviously is not easy to implement. Let alone the fact that GUI does allow you to pick issues from other repositories.
Non-interactive
With these repeatable options:
--blocked-by <NUMBER | URL | REFERENCE>--blocking <NUMBER | URL | REFERENCE>The arguments can be either:
owner/repo#numberformat to support cross-repo associations.2.
issue editInteractive
Warning
The same challenge as above.
Non-interactive
With these repeatable options:
--add-blocked-by <NUMBER | URL | REFERENCE>--add-blocking <NUMBER | URL | REFERENCE>--remove-blocked-by <NUMBER | URL | REFERENCE>--remove-blocking <NUMBER | URL | REFERENCE>3.
issue viewInteractive
Currently, we don't show closing PRs in the interactive view, so we might want to keep the same behaviour for blocking/blocked-by associations. If not, we can display two group of URLs/references; blocking and blocked-by.
Non-interactive; plain (e.g. piped output)
issue viewcurrently prints a minimal machine readable output like this:We can add two more entries like:
Or even omit the association data since they're niche metadata. 🤷
Non-interactive; JSON
I can think of two new JSON fields to hold the full URL of the associated issues:
{ "id": "99999999", // ... "blockingIssues": [ { "url": "https://github.com/OWNER/REPO/issues/99999" } ], "blockedByIssues": [ { "url": "https://github.com/OWNER/REPO/issues/99999" } ] }The URL is necessary to allow cross-repo links.
Implementation challenges
github.com. So feature detection is necessary.prcommands:issue createandissue editreuse some components fromprcommands to supply metadata of the subject "issue". Since the API only supports the association between issues, we'd have to handle this separately inissuecommands. I don't know if there's any plan to support such associations with PRs, but if there'll be such a thing, then we'd probably have to go through refactoring and making things reusable.ghand needs careful design, especially regarding accessibility.Notes for the team
It's a nice addition, but at the same time a complicated one. See the short list of the challenges just above this.
dkaszews commentedon Nov 17, 2025
It also seems to be the issue that there is no API for getting all blocked/blocking issues (like you can in web search), best I could find is to iterate over all issues and checking if they return a non-empty array, which is really suboptimal for large repositories.
BagToad commentedon Apr 8, 2026
Issue relationship flags are in progress, covering
--blocked-by/--blockingon create, and--add-blocked-by/--remove-blocked-by/--add-blocking/--remove-blockingon edit. The full design is up for review at #13120. If you have feedback on the proposed flags or behavior, please comment there!