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

Prototype Support for Azure DevOps Git Repos #97

Open
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

lucasmodrich
Copy link

This PR is intended to address #96
This is a prototype that uses the Microsoft Go library for integrating with Azure DevOps.

Copy link

changeset-bot bot commented Feb 10, 2025

⚠️ No Changeset found

Latest commit: 14f9c99

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Owner

@AkashRajpurohit AkashRajpurohit left a comment

Choose a reason for hiding this comment

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

Can you also share logs from testing this out directly.

@lucasmodrich
Copy link
Author

Can you also share logs from testing this out directly.

Note I have edited the output to remove sensitive and identifying information

./git-sync
{"level":"info","time":"2025-02-18T13:46:40.320+1100","message":"Config loaded from: /home/testuser/.config/git-sync/config.yaml"}
{"level":"info","time":"2025-02-18T13:46:40.320+1100","message":"✅ Valid config found"}
{"level":"info","time":"2025-02-18T13:46:40.320+1100","message":"Using Platform: msdevops"}
{"level":"info","time":"2025-02-18T13:46:40.961+1100","message":"Total msdevops repositories: 5"}
{"level":"info","time":"2025-02-18T13:46:40.962+1100","message":"Cloning raw repo: https://[email protected]/TestBusinessName/TestProject/_git/repo-1"}
{"level":"warn","time":"2025-02-18T13:48:00.963+1100","message":"Skipping repo repo-2 as it is disabled"}
{"level":"info","time":"2025-02-18T13:48:00.964+1100","message":"Cloning raw repo: https://[email protected]/TestBusinessName/TestProject/_git/repo-3"}
{"level":"info","time":"2025-02-18T13:50:40.942+1100","message":"Cloning raw repo: https://[email protected]/TestBusinessName/TestProject/_git/repo-4"}
{"level":"warn","time":"2025-02-18T13:52:00.903+1100","message":"Skipping repo repo-5 as it is disabled"}
{"level":"info","time":"2025-02-18T13:56:21.648+1100","message":"✅ Repositories: 3 successfully synced"}
{"level":"info","time":"2025-02-18T13:56:21.650+1100","message":"✅ Wikis: 0 successfully synced"}

Comment on lines +95 to +97
allRepos, err := client.GetRepositories(ctx, git.GetRepositoriesArgs{
Project: &cfg.Workspace,
})
Copy link
Owner

Choose a reason for hiding this comment

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

Does it require a workspace as well? can you share the sample config file (without sensitive data) as example for running this?

Copy link
Owner

Choose a reason for hiding this comment

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

Also is this not a paginated API, if it is then we will be fetching only certain limit of records in this current setup.

Copy link
Author

Choose a reason for hiding this comment

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

Logging has been removed

Copy link
Author

Choose a reason for hiding this comment

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

Does it require a workspace as well? can you share the sample config file (without sensitive data) as example for running this?

I will need to double check this. I suspect it may not be required. Azure DevOps has an odd URL for the git repo which I couldn't easily assemble from the info in the config file - but if you ask it for the list of repos, a usable URL is available. I think I updated the code to disassemble that and insert the PAT@ at the start to ensure PAT based auth.

I will review it again when I get time.

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.

2 participants