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

Adding Azure DevOps as a provider #217

Merged
merged 8 commits into from
Dec 29, 2021
Merged

Adding Azure DevOps as a provider #217

merged 8 commits into from
Dec 29, 2021

Conversation

rumstead
Copy link
Contributor

Closes #94

return &adoGit{
adoClient: gitClient,
opts: opts,
adoUrl: adoUrl,
Copy link
Contributor

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?

Copy link
Contributor Author

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?

Copy link
Contributor

@roi-codefresh roi-codefresh Dec 22, 2021

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

Copy link
Contributor Author

@rumstead rumstead Dec 22, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, it is :).

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.

@roi-codefresh roi-codefresh merged commit 0e52497 into argoproj-labs:main Dec 29, 2021
@rumstead rumstead deleted the feat/add-ado-provider branch January 3, 2022 14:34
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.

Do you support azure git provider ?
3 participants