Open Thane5 opened 2 years ago
This is definitely needed.
Another vote here. for self hosted also please.
The Rest endpoint is (cloud):
https://{accountName}.visualstudio.com/{project}/_apis/git/repositories/
The Rest endpoint for self hosted is:
Selfhosted JSON output is as follows;
{
"value": [
{
"id": "9e5faed6-e9f1-4870-ac56-04cdcd91d28e",
"name": "repo1 name",
"url": "https://my.host/tfs/DefaultCollection/7dbc8a58-68d3-42a6-a731-859d4d6a57c9/_apis/git/repositories/9e5faed6-e9f1-4870-ac56-04cdcd91d28e",
"project": {
"id": "7dbc8a58-68d3-42a6-a731-859d4d6a57c9",
"name": "MYPROJECT",
"description": "My Project Description",
"url": "https://my.host/tfs/DefaultCollection/_apis/projects/7dbc8a58-68d3-42a6-a731-859d4d6a57c9",
"state": "wellFormed",
"revision": 44170907,
"visibility": "private",
"lastUpdateTime": "2023-10-28T15:26:50.147Z"
},
"defaultBranch": "refs/heads/master",
"size": 15723669,
"remoteUrl": "https://my.host/tfs/DefaultCollection/TPA/_git/repo1_name",
"sshUrl": "ssh://my.host:22/tfs/DefaultCollection/TPA/_git/repo1_name",
"webUrl": "https://my.host/tfs/DefaultCollection/TPA/_git/repo1_name"
},
{
"id": "97c7a904-3722-4b83-8c8d-fe5b19012b54",
"name": "repo2 name",
"url": "https://my.host/tfs/DefaultCollection/7dbc8a58-68d3-42a6-a731-859d4d6a57c9/_apis/git/repositories/97c7a904-3722-4b83-8c8d-fe5b19012b54",
"project": {
"id": "7dbc8a58-68d3-42a6-a731-859d4d6a57c9",
"name": "MYPROJECT",
"description": "My Project Description",
"url": "https://my.host/tfs/DefaultCollection/_apis/projects/7dbc8a58-68d3-42a6-a731-859d4d6a57c9",
"state": "wellFormed",
"revision": 44170907,
"visibility": "private",
"lastUpdateTime": "2023-10-28T15:26:50.147Z"
},
"defaultBranch": "refs/heads/master",
"size": 517985,
"remoteUrl": "https://my.host/tfs/DefaultCollection/TPA/_git/repo2_name",
"sshUrl": "ssh://my.host:22/tfs/DefaultCollection/TPA/_git/repo2_name",
"webUrl": "https://my.host/tfs/DefaultCollection/TPA/_git/repo2_name"
}
],
"count": 2
}
Fork has a handy window that shows your accounts from several Git hosting sites and lets you directly clone repositories from there.
It seems that currently there is no way to connect your Azure Repos (https://dev.azure.com/) with it, but it would make very much sense to have that feature.