Conversation
samcoe
left a comment
There was a problem hiding this comment.
I like this direction 👍, left just one comment for discussion.
|
Regarding the open questions:
|
samcoe
left a comment
There was a problem hiding this comment.
This looks great. Left a couple comments, nothing blocking though 👍
| exts, err := m.list(false) | ||
| assert.NoError(t, err) | ||
| assert.Equal(t, 1, len(exts)) | ||
| ext := exts[0] | ||
| ext.currentVersion = "old version" | ||
| ext.latestVersion = "new version" |
There was a problem hiding this comment.
I know that I introduced this pattern so that I could set currentVersion and latestVersion on an stub extension but after realizing how verbose it is I would definitely like to rethink how we could make it easier to set the versions for a stubbed extension. Not something to address in this PR though, just something to think about.
mislav
left a comment
There was a problem hiding this comment.
Love the approach. Some notes on the added helpers for git remotes
mislav
left a comment
There was a problem hiding this comment.
This looks good! Sorry for the delay 🙇
| return remotes, nil | ||
| } | ||
|
|
||
| func RemotesForPath(path string) (RemoteSet, error) { |
There was a problem hiding this comment.
Shouldn't be addressed in this PR, but across different PRs I'm seeing more and more of the SomethingWithPath functions added to the git package. I wonder whether that should motivate us to restructure our git client as an object that could be initialized with a path or without one? Then, if a path was configured, it would automatically perform all git lookups in the specified directory instead of the current directory. After that, we would not need to add specialized "WithPath" functions.
8be75de to
54b82dd
Compare
Part of #4194
This PR:
ghrepo.Interfaceand git remotes for a git repo at an arbitrary path (ghrepo.FromPath)considerations
gh-*script from the repo's root which would show up as a git upgrade. Is this too hacky? Should we aggressively check for the new binary format even if there is not a git upgrade available?