`gh repo edit` reports success when changing visibility of a fork but no change is made · Issue #13233 · cli/cli · GitHub
Skip to content

gh repo edit reports success when changing visibility of a fork but no change is made #13233

Description

@achar-pranav

Describe the bug

When attempting to change the visibility of a forked repository using gh repo edit interactively, the CLI reports ✓ Edited repository but no change is actually made. Forks cannot have their visibility changed independently from the upstream repository, but the CLI gives no indication of this and silently reports success.

Affected version

gh version 2.46.0 (2025-01-13 Debian 2.46.0-3)
https://github.com/cli/cli/releases/tag/v2.46.0

Steps to reproduce the behavior

  1. Run gh repo edit on a forked repository
  2. Select Visibility from the interactive prompt
  3. Choose a new visibility value and confirm
  4. Observe output ✓ Edited repository <owner>/<repo>
  5. Run gh repo view <owner>/<repo> --json visibility — visibility is unchanged

Expected vs actual behavior

Expected: The CLI should return an error indicating that visibility cannot be changed on a forked repository, e.g. error: cannot change the visibility of a forked repository

Actual: The CLI reports ✓ Edited repository with no error, giving the impression the change was successful when it was not.

Logs

N/A
Image

Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggh-reporelating to the gh repo commandpriority-3Affects a small number of users or is largely cosmeticstale

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions