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
- Run
gh repo edit on a forked repository
- Select
Visibility from the interactive prompt
- Choose a new visibility value and confirm
- Observe output
✓ Edited repository <owner>/<repo>
- 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


Describe the bug
When attempting to change the visibility of a forked repository using
gh repo editinteractively, the CLI reports✓ Edited repositorybut 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
Steps to reproduce the behavior
gh repo editon a forked repositoryVisibilityfrom the interactive prompt✓ Edited repository <owner>/<repo>gh repo view <owner>/<repo> --json visibility— visibility is unchangedExpected 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 repositoryActual: The CLI reports
✓ Edited repositorywith no error, giving the impression the change was successful when it was not.Logs
N/A
