You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe in this plugin at least we can? If so, the solution should probably be using BUILD_SOURCEBRANCH (complete name, including "refs/heads/") and statically removed the "refs/heads/" at the beginning
Steps to Reproduce
Have a branch with a slash in its name (e.g. "feature/iss123_description")
Hello thank you for raising this and linking the discussion on MS!
I find it very wrong that Build.SourceBranchName effectively returns tools for refs/heads/feature/tools. Clearly you can disagree all day long that tools is not the full name of the branch and that the behaviour is documented...I still find it wrong.
Anyhow indeed the plugin is currently using BUILD_SOURCEBRANCHNAME. I guess as you suggested the only option to solve this would be using BUILD_SOURCEBRANCH and then manually stripping the refs/heads/.
Azure Devops - Incomplete git branch name
Relating to feature git-commit-id/git-commit-id-maven-plugin#438
The predefined variables in Azure Devops can lead to incomplete branch names: According to
https://docs.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml#build-variables
you can see that BUILD_SOURCEBRANCHNAME only contains everything behind the last slash ('/'). This is incomplete however if the branchname itself contains a slash.
There is an issue on DevOps side, but it seems they are not changing that behavior
https://developercommunity.visualstudio.com/t/azure-devops-build-variable-buildsourcebranchname/519811
Maybe in this plugin at least we can? If so, the solution should probably be using BUILD_SOURCEBRANCH (complete name, including "refs/heads/") and statically removed the "refs/heads/" at the beginning
Steps to Reproduce
Have a branch with a slash in its name (e.g. "feature/iss123_description")
Build the project in a AzureDevops Pipeline
Result: The git.properties file contains the branch as "git.branch=ss123_description"
Expected behavior
Additional context
For reproducibility please provide the following:
The text was updated successfully, but these errors were encountered: