-
Notifications
You must be signed in to change notification settings - Fork 126
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
Adding Azure DevOps as a provider #217
Adding Azure DevOps as a provider #217
Conversation
return &adoGit{ | ||
adoClient: gitClient, | ||
opts: opts, | ||
adoUrl: adoUrl, |
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.
I don't think you should use the parsed url here because it is parsed from opts.Host
which is not the full url. Isn't it a problem?
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.
The ADO client doesn't actually need the URL. You log into ADO using the organization URL. Then via their structs provide the project and repo name. Since I use the repo name from the CreateRepoOptions
, there were never any issues. I removed the repoName
parsing since it wasn't actually doing anything.
It is very confusing what is going on with the URL... any suggestions?
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.
How do you actually parse the project name from the opts.Host
. Seems like it would not actually be there..
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.
Oh, it is :).
argocd-autopilot/pkg/util/repospec.go
Line 30 in 7a325d8
host = normalizeGitHostSpec(n[:index+len(gitDelimiter)]) |
Host =
https://dev.azure.com/TEST/rumstead/_git/
where TEST is the subscription and rumstead is the project.
Let me know if you want me to change it or any suggestions on how to make it cleaner.
Closes #94