-
Notifications
You must be signed in to change notification settings - Fork 66
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
Introduce safe host parsing function #63
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.
👋 Hey @mouismail. Sorry for the delays getting to this. We reviewed this and added some comments and suggestions. Let us know if we can help with anything!
Co-authored-by: Kynan Ware <[email protected]>
Co-authored-by: Kynan Ware <[email protected]>
Co-authored-by: Kynan Ware <[email protected]>
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.
Thank you again for your contribution @mouismail ✨
I'll get this merged...
Ignoring the two CI tests for MacOS which are likely caused by old actions versions... |
This pull request primarily focuses on improving error handling and code readability in the OAuth flow. The changes include the introduction of a new function
NewGitHubHost
inoauth.go
to parse the host URL and return an error if parsing fails. This function is then used in the filesexamples_test.go
,oauth_device.go
, andoauth_webapp.go
to replace the previous method of creating a new host, improving error handling in the process.Fixes: #62
Related: cli/cli#9248