microsoft / microsoft/azure-devops-go-api
Help listing repositories
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 223
- Forks
- 92
- PR merge metrics
- No merged PRs in 30d
Description
I am trying to get a list of all repositories under a project.
I was able to get the desired project however I am stuck on the build.ListRepositories call
var name string = *projectRef.Name
var ProviderType string = "Git"
buildClient, err := build.NewClient(ctx, connection)
if err != nil {
log.Fatal(err)
}
response, err := buildClient.ListRepositories(ctx, build.ListRepositoriesArgs{Project: projectRef.Name, ProviderName: &ProviderType })
Using ProviderType "Git" yields
Value cannot be null. Parameter name: serviceEndpointId
I browsed to https://dev.azure.com/{org}/{project}/_apis/serviceendpoint/endpoints?api-version=7.0
And found there are no endpoints
I browsed to https://dev.azure.com/{org}/{project}/_apis/sourceproviders?api-version=7.0
and found the following options:
- TfsVersionControl
- GitHubEnterprise
- Svn
- GitHub
- BitBucket
- Git
- TFSGit
When trying TfsVersionControl or TfsGit the ListRepositories() call never resolves.
We are using Microsoft's hosted Azure Devops (dev.azure.com) for hosting.
I tried curling the repositories endpoint using my PAT base64 encoded as a bearer token.
curl -L -X GET \ -H "Authorization $PAT" \ "https://dev.azure.com/{org}/{project}/_apis/git/repositories?api-version=7.0"
When running this I get an error
Microsoft Internet Explorer's Enhanced Security Configuration is currently enabled on your environment. This enhanced level of security prevents our web integration experiences from displaying or performing correctly. To continue with your operation please disable this configuration or contact your administrator.
is it possible I am correctly using buildClient.ListRepositories() and it's not catching this error?
Do we have to create a service endpoint in order to list repositories?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with build.ListRepositories and compare its request with the listed Azure DevOps repositories and sourceproviders endpoints. Reproduce the serviceEndpointId error and the hanging provider calls using the issue's examples. Done means the required endpoint or API behavior is established and the failure is documented or corrected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure, go
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100