-
Notifications
You must be signed in to change notification settings - Fork 60
[NOISSUE] remove host from the new rovodev login flow #1547
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
base: main
Are you sure you want to change the base?
Conversation
src/rovo-dev/rovoDevAuthValidator.ts
Outdated
| * and extract the cloud ID from the first one. | ||
| */ | ||
| async function fetchCloudId(host: string): Promise<string> { | ||
| async function fetchCloudId(email: string): Promise<string> { |
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.
🔎 Code Readability - Unused Variable
The email parameter is unused in this function and should be removed.
Details
📖 Explanation: The email parameter is passed to fetchCloudId but never used since the function only returns a hardcoded placeholder value. This creates dead code and misleading function signature.
|
How do we support the multiple site dis-ambiguation? |
| // Use a placeholder host since RovoDev doesn't require it | ||
| return { | ||
| host: rovoDevAuth.host, | ||
| host: 'unused-rovodev-host.atlassian.net', |
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.
? - This feels sketch
src/rovo-dev/rovoDevAuthValidator.ts
Outdated
| return data.cloudId; | ||
| // Return a placeholder cloud ID | ||
| // The actual cloud ID will be determined by the backend when needed | ||
| return 'rovodev-placeholder-cloudid'; |
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.
trying a return of a constant seems unusual
ef6dcfd to
c07b006
Compare
| if (newState.state === 'Downloading' || newState.state === 'Starting' || newState.state === 'Started') { | ||
| this._userInfo = newState.jiraSiteUserInfo; | ||
| this._jiraItemsProvider.setJiraSite(newState.jiraSiteHostname); | ||
| // this._jiraItemsProvider.setJiraSite(newState.jiraSiteHostname); |
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.
@sdzh-atlassian without host, we need to rethink how the issue provider works
| if (!creds) { | ||
| return undefined; | ||
| } | ||
| return { |
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.
🔎 Code Readability - Code Duplication
The duplicate credential conversion logic should be extracted into a helper function to reduce code duplication.
Details
📖 Explanation: The same credential mapping logic appears twice in the getCredentials method, which violates the DRY principle and makes maintenance harder.
What Is This Change?
Cleaning up
hostfrom the new rovodev authentication processImportant caveat - this also removes the
--site-url {siteUrl}flag from rovodevProcessManagerHow Has This Been Tested?
Manually, see demo:
https://www.loom.com/share/dbc0bdd7e3a94d378578a3e1fd86dab1
Basic checks:
npm run lintnpm run testAny suggestions or improvements have been posted as pull request comments.