# Adding branch name to LivingDoc ## Branch name in LivingDoc Generator Using the `--title` [command line option](../LivingDocGenerator/Using-the-command-line-tool.html#options) the branch name (and commit information) can be included in the generated HTML. ![Branch Name](../_static/images/Generator/branch_name2.png) This process can be automated using a CI/CD system. ## Branch name in Azure DevOps Pipeline Azure DevOps Pipelines provides a rich [set of variables](https://docs.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml#build-variables-devops-services) like the branch name and commit message. Any of these variables can be used as part of the document title when the LivingDoc.CLI task is executed in the Pipeline. First the LivingDoc.CLI has to be installed on the Agent, using the .NET Core build task ![Install CLI](../_static/images/Generator/azdo-pipeline-install-cli.png) - Command `custom` - Custom command: `tool` - Arguments: `install --global SpecFlow.Plus.LivingDoc.CLI` YAML steps: - task: DotNetCoreCLI@2 displayName: 'dotnet custom' inputs: command: custom custom: tool arguments: 'install --global SpecFlow.Plus.LivingDoc.CLI' Then the CLI can be invoked after the **Visual Studio Test** task using the Command line task. In the script parameter the `%Build_SourceBranchName%` and `%Build_SourceVersion%` variables will be replaced during execution: ![Invoke CLI](../_static/images/Generator/azdo-pipeline-invoke-cli.png) Script: ``` batch livingdoc test-assembly MyProject.Specs\bin\Debug\netcoreapp3.1\MyProject.Specs.dll --title "BookShop (%Build_SourceBranchName% - Build_SourceVersion:~0,7%)" ``` YAML ``` yaml steps: - script: 'livingdoc test-assembly MyProject.Specs\bin\Debug\netcoreapp3.1\MyProject.Specs.dll --title "BookShop (%Build_SourceBranchName% - Build_SourceVersion:~0,7%)"' workingDirectory: BookShop.AcceptanceTests displayName: 'Command Line Script' ```