Skip to content

gh repo rename myorg/newname results in myorg/myorg-newname #10034

@johnstonmatt

Description

@johnstonmatt

Describe the bug

gh version 2.63.0 (2024-11-27)
https://github.com/cli/cli/releases/tag/v2.63.0

I renamed my repo using gh repo rename polyseam/frappe-containers, this resulted in the preview being correct:

? Rename polyseam/containers to polyseam/frappe-containers? Yes

but the result being wrong:

✓ Renamed repository polyseam/polyseam-frappe-containers

Steps to reproduce the behavior

  1. gh repo create org/foo-repo --private --clone
  2. cd foo-repo
  3. gh repo rename org/bar-repo
  4. note the confirm prompt is correct
  5. enter Yes
  6. note the incorrect result: "✓ Renamed repository org/org-bar-repo"

Expected vs actual behavior

The resulting repo name should not be prefixed with orgname- and should instead match the preview in step 4.

Logs

Paste the activity from your command line. Redact if needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggh-reporelating to the gh repo commandhelp wantedContributions welcomep3Affects a small number of users or is largely cosmetic

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions