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

Remove the need to pass an account to getFallbackUrlForProxyResolve #18626

Merged
merged 7 commits into from
May 22, 2024

Conversation

niik
Copy link
Member

@niik niik commented May 16, 2024

xref #18586

Description

This is almost exclusively a refactor PR (notable exception is deleteRemoteBranch). We're trying to remove account from withAuthenticatingUser such that can freely modify (or remove) the getGenericHostname in order to be able to store more than one credential per host.

Prior to this PR getFallbackUrlForProxyResolve required an IGitAccount to resolve the url to use for resolving a proxy. That IGitAccount came all the way from withAuthenticatingUser and was resolved either by looking up the GitHubRepository associated with a Repository and using its endpoint to resolve an Account (which would then have the same endpoint) or by using the currentRemote of the repository to look up a generic account. We've tried to replicate this in getFallbackUrlForProxyResolve while removing the need for an account.

The deleteRemoteBranch method exception is that it would previously always make a call out to git remote in order to look up the current remote. With this refactor we're using the already loaded remotes from the GitStore to avoid that invocation (though we fall back to invoking if the gitStore doesn't have the remote we need).

Screenshots

Release notes

Notes:

niik and others added 6 commits May 16, 2024 13:19
Co-Authored-By: Sergio Padrino <1083228+sergiou87@users.noreply.github.com>
Co-Authored-By: Sergio Padrino <1083228+sergiou87@users.noreply.github.com>
Co-Authored-By: Sergio Padrino <1083228+sergiou87@users.noreply.github.com>
…motes

Co-Authored-By: Sergio Padrino <1083228+sergiou87@users.noreply.github.com>
Co-Authored-By: Sergio Padrino <1083228+sergiou87@users.noreply.github.com>
We hate this but this is replicating the previous behavior

Co-Authored-By: Sergio Padrino <1083228+sergiou87@users.noreply.github.com>
Co-Authored-By: Sergio Padrino <1083228+sergiou87@users.noreply.github.com>
@niik niik requested a review from tidy-dev May 22, 2024 10:25
@niik niik merged commit 2e004b9 into development May 22, 2024
7 checks passed
@niik niik deleted the proxy-url-without-account branch May 22, 2024 14:46
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.

None yet

2 participants