-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: autoconfigure github repos #712
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking into what's going on with this test. Something with the go SDK
@@ -499,6 +503,39 @@ func configureGithub(ctx context.Context, _flags ConfigureGithubFlags) error { | |||
|
|||
ctx = events.SetTargetInContext(ctx, workingDir) | |||
|
|||
// check if the git repository is a github URI | |||
event := shared.CliEvent{} | |||
events.EnrichEventWithGitMetadata(ctx, &event) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I feel like this is a bit of a hack. Can we just expose a method like GetGitMetadata
that is used both inside EnrichEvent
and here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ya I was just trying to not change it in core, I can do that
|
||
if continueAfterInstall { | ||
browser.OpenURL(appInstallURL) | ||
logger.Println(styles.Info.Render("Install the Github App then continue with `speakeasy configure github`!\n")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we not wait until we detect its installed, then continue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could poll. But I'm not sure that's the best idea.
- We don't know what kind of caching github has in place
- Sometimes a user may not have the right permissions to install it by themselves.
Polling just felt kind of weird to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some nits, nothing that important
…ate_github_app_prompts
If speakeasy configure github is called from a directory with a remote default we