在 azure devops 上使用 api 检查 git 分支是否被锁定。

问题描述 投票:0回答:1

有没有办法检查哪些分支被 rest api 或 tf.exe 或任何客户端库 api 锁定?

我试着按照这篇文章去做 https:/docs.microsoft.comen-usrestapiazuredevopsgitrefslist?view=azure-devops-rest-5.0#gitref。 且响应不包含lockedunlocked标志。

谢谢。

git azure tfs branch devops
1个回答
0
投票

你使用的是正确的Rest API。

GET https://{instance}/{collection}/{project}/_apis/git/repositories/{repositoryId}/refs?filter=heads/xxx &api-version=5.0 

请检查您的 URI参数 只要确保你使用的是正确的过滤器。

应该有 isLockedisLockedBy 返回的json文件的信息。

© www.soinside.com 2019 - 2024. All rights reserved.