Visitar URL original
Add `--related-to` flags to `gh issue create` / `gh issue edit` for the "Relates to" relationship · Issue #14467 · cli/cli · GitHub
Skip to content

Add --related-to flags to gh issue create / gh issue edit for the "Relates to" relationship #14467

Description

@zote

Describe the feature or problem you’d like to solve

As of v2.101.0, gh covers almost every relationship in the issue sidebar: --parent / --add-sub-issue / --remove-sub-issue for sub-issues, --blocked-by / --blocking and --add-blocked-by / --remove-blocked-by / --add-blocking / --remove-blocking for dependencies, plus parent, blockedBy, blocking in gh issue view --json. That came from #10298, #11757 and the design in #13120.

The one relationship left out is "Relates to" — the non-blocking link in the same Relationships panel. There is no flag on gh issue create or gh issue edit, and no field in gh issue view --json, so the only way to record it is to open the issue in a browser and click through the UI.

That is a real gap for scripted and agentic workflows (see #12522): a script can now open an issue and wire up every blocking dependency and every sub-issue in the same command, but if two issues are merely related — a decision issue and the issue that implements it, a bug and the follow-up that hardens it — it has to stop and ask a human to finish the job by hand. In practice the link often just gets written as a mention in the body instead, where it does not show up in the sidebar and is not filterable.

Proposed solution

Mirror the flags that already exist for dependencies:

  • gh issue create --related-to <numbers or URLs>
  • gh issue edit --add-related-to <numbers or URLs> and --remove-related-to <numbers or URLs>
  • relatedTo as a gh issue view --json field, and the relationship shown in the TTY view next to blockedBy / blocking

Naming and cross-repo URL handling would follow whatever --blocked-by / --blocking already do, so there is nothing new to learn.

Additional context

This is very likely blocked on the API, and I'm filing it so it's tracked rather than because it can be picked up today. Probing the public API today (2026-09-17), "Relates to" looks UI-only:

  • REST: the issue dependencies endpoints expose only blocked_by and blocking; GET /repos/{owner}/{repo}/issues/{n}/related and .../relationships both 404.
  • GraphQL: the Issue type has blockedBy, blocking, parent, subIssues and subIssuesSummary, but no related-issues field; the only relationship mutations in the schema are addSubIssue, removeSubIssue and reprioritizeSubIssue.

So this probably has to wait for GitHub to expose the relationship — the feature has been in public preview since August 2026. If that's the case, this issue can serve as the place to track it so it isn't forgotten once the API lands, since the CLI side is already shaped by the work done for #11757.

Activity

  1. cli-triage commented on Sep 17, 2026

    @cli-triage

    This looks like a well-scoped, clearly written enhancement request, so I'm suggesting the enhancement and gh-issue labels: it proposes mirroring the existing --blocked-by/--blocking flags (added in #11757, building on the design in #13120 and #12522's use case) with new --related-to flags for the non-blocking "Relates to" relationship, and the author has already checked that GitHub's REST and GraphQL APIs don't currently expose that relationship, so implementation is likely blocked on GitHub's side for now. I did not find any existing duplicate issue tracking this specific "Relates to" flag request.

    Generated by Issue Triage (skills-driven) for #14467 · copilot · auto · 29.1 AIC · ⌖ 2.29 AIC · ⊞ 10K · ◷

  2. github-actions commented on Sep 17, 2026

    @github-actions
    Contributor

    Thank you for your issue! We have categorized it as an enhancement (feature or improvement) 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 wanted Contributions 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.

  3. rileybroughten commented on Oct 2, 2026

    @rileybroughten

    The relates to relationship is now GA - see changelog

    Let me know if there is anything else required to get this moving along!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedenhancementa request to improve CLIgh-issuerelating to the gh issue command

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions