Equivalent of teamcity.build.branch.is_default in Azure Devops

Refresh

March 2019

Views

26 time

1

Is there an equivalent of %teamcity.build.branch.is_default% in Azure Devops?

1 answers

2

No there isn't. You can see what is available as predefined build variables.

You can get to it though with a combination of Build.SourceBranch and using the Get Repository API, which has a property for default branch.