Skip to content
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

Add support for http_unix_socket #30

Merged
merged 2 commits into from May 17, 2022
Merged

Add support for http_unix_socket #30

merged 2 commits into from May 17, 2022

Conversation

samcoe
Copy link
Contributor

@samcoe samcoe commented May 4, 2022

This PR adds support for automatically resolving gh config http_unix_socket.

Closes #2
cc cli/cli#5560

@samcoe samcoe self-assigned this May 4, 2022
@samcoe samcoe marked this pull request as ready for review May 4, 2022 09:55
@samcoe samcoe requested a review from mislav May 4, 2022 09:55
internal/api/http.go Outdated Show resolved Hide resolved
pkg/api/http.go Outdated Show resolved Hide resolved
Copy link
Contributor

@mislav mislav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic; thanks for adding this

gh.go Outdated
return err
var notFoundError iconfig.NotFoundError
if errors.As(err, &notFoundError) {
return fmt.Errorf("auth token not found for host %s", opts.Host)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: "authentication token" instead of "auth token"

Also, should this error be of a unique type so that integrators can handle it specifically?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that is a good idea, but can be implemented in a follow up PR.

pkg/api/http.go Outdated Show resolved Hide resolved
@samcoe samcoe enabled auto-merge (squash) May 17, 2022 19:22
@samcoe samcoe merged commit d4b5b6b into trunk May 17, 2022
@samcoe samcoe deleted the unix-socket branch May 17, 2022 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support gh http_unix_socket configuration option
2 participants