Is there a way to check which branch's are locked by rest api or tf.exe or any client library api?
I try work follow this article https://learn.microsoft.com/en-us/rest/api/azure/devops/git/refs/list?view=azure-devops-rest-5.0#gitref and the response not contains the locked/unlocked flag.
Thanks.
https://{baseUrl}/{organisation}/{project}/_apis/git/repositories/{repoId}/refs?filter=heads/***/master&api-version=6.0

One catch over here, if your branch is not locked then "Islocked" & "Creator" section will not ever get in response.
To get for all the branches info you can run url without filters
eg.
https://{baseUrl}/{organisation}/{project}/_apis/git/repositories/{repoId}/refs?&api-version=6.0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With