Skip to content

Introduce safe host parsing function - #63

Merged
BagToad merged 6 commits into
cli:mainfrom
mouismail:mouismail-issue-61
Oct 8, 2024
Merged

BagToad merged 6 commits into
cli:mainfrom
mouismail:mouismail-issue-61

Conversation

@mouismail

@mouismail mouismail commented Jun 25, 2024 •

Copy link
Copy Markdown
Contributor

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 in oauth.go to parse the host URL and return an error if parsing fails. This function is then used in the files examples_test.go, oauth_device.go, and oauth_webapp.go to replace the previous method of creating a new host, improving error handling in the process.

Fixes: #62
Related: cli/cli#9248

Comment thread oauth.go Resolved
Comment thread oauth.go Resolved
Comment thread examples_test.go Resolved
Comment thread oauth.go Resolved
Comment thread oauth_device.go Resolved
Comment thread oauth_webapp.go Resolved

@BagToad BagToad left a comment

Copy link
Copy Markdown
Member

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!

@BagToad BagToad left a comment

Copy link
Copy Markdown
Member

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...

@BagToad

BagToad commented Oct 8, 2024

Copy link
Copy Markdown
Member

Ignoring the two CI tests for MacOS which are likely caused by old actions versions...

@BagToad
BagToad merged commit afffc8e into cli:main Oct 8, 2024
@BagToad BagToad changed the title create new func to avoid the bug on issue #61 Introduce safe host parsing function Oct 8, 2024
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.

Introduce safe host parsing command

4 participants