Conversation
mislav
left a comment
There was a problem hiding this comment.
This looks good! One question about local git remotes that still point to the old name. If gh repo rename is run from the context of the local checkout of the repository that's just been renamed, should we update the git remote to point to the new name? I'm guessing that if we don't, users might perceive that as a bug (or, at least, as a missed opportunity) of repo rename.
Team: what do you think?
samcoe
left a comment
There was a problem hiding this comment.
@pxrth9 I left a couple more comments, mostly small UX polish. Regarding the tests, that is happening because the git remote set call needs to be stubbed out in the tests that call it. You can use the internal/run/stub.go package to do it. There are numerous examples in our tests that you probably can copy from.
samcoe
left a comment
There was a problem hiding this comment.
This is awesome! Thanks for being patient through the review process!
There was a problem hiding this comment.
Excellent work!!
In testing this I did an accidental rename that scared me half to death so I took the liberty of adding a confirmation step for the specific invocation gh repo rename newname. There's no confirmation if -R is used or if the repo was prompted for.
It's a testament to how nice your code and tests were that I could add the change so quickly, well done.
mislav
left a comment
There was a problem hiding this comment.
This is looking excellent. I got some polish-level requests, as well as pointing out some formatting and spelling mistakes.
mislav
left a comment
There was a problem hiding this comment.
This looks excellent. Thanks for the hard work!
|
Whoops, I meant to squash-merge this but it appears it already had auto-merge enabled. |
Fixes #1399