Open ravibha opened 5 years ago
Hi
You can use below code to get all Repositories
restClient = RestClient.getClient();
restClient.getRepositories(projectName, true).then(results => {
debugger;
allRepos = results;
var repoIds = [];
var repoNames = [];
for (var i = 0; i < allRepos.length; i++) {
var record = allRepos[i];
repoIds.push(record.id);
repoNames.push(record.name);
}
});
Hi,
I am also missing this information. Is it possible to retrieve current active repository id through the vss sdk?
Thanks
That may be difficult. You need to provide the projectName to get the repo id. But there is no way to get the active repo.
Is this still the case? I need to retrieve an image from the current repository for my use case, which from my understanding needs to be done through the Git APIs which require the repositoryId
. I need to grab it from the current repository, not any others.
Hi VSS team, Is there an api or some kind of context object that can provide information about the current repository? I am building an extension that needs to show repository information. I know there are apis that get repo information about a repo based on a repository id. But I am not sure how to get the repo id in the context of the repo. Can some one provide guidance on this?
Thanks!