title: $(System.PullRequest.SourceBranch) no found
body: <p>Referring to the documentation: <a href="https://docs.microsoft.com/en-us/vsts/pipelines/build/variables?view=vsts" rel="nofollow noreferrer">Microsft Guide</a></p>
  <p>I'm using a Command Line task to be able to create git Tags were I want to target the System.PullRequest.SourceBranch. The problem is that is not letting me use this since is giving me the following error through the Azure pipeline:</p>
  <pre><code>System.PullRequest.SourceBranch: /home/vsts/work/_temp/be5fc781-2582-4e49-a126-7e4db3302e75.ps1:7
  Line |
     7 |  git checkout -b $(&quot;$(System.PullRequest.SourceBranch)&quot;.replace('refs/ …
       |                       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       | The term 'System.PullRequest.SourceBranch' is not recognized
       | as a name of a cmdlet, function, script file, or executable
       | program. Check the spelling of the name, or if a path was
       | included, verify that the path is correct and try again.
  
  ##[error]PowerShell exited with code '1'.
  </code></pre>
  <p>Even if I try the command above, it will not let me see any values:</p>
  <pre><code>echo $(System.PullRequest.SourceBranch)
  </code></pre>
  <p>I'm currently using this command:</p>
  <p><code>git checkout -b $(&quot;$(System.PullRequest.SourceBranch)&quot;.replace('refs/heads/', ''))</code></p>
  <p>My current file is the following:</p>
  <pre><code>trigger:
  - none
  ## notes
  pool:
    vmImage: ubuntu-latest
  
  ## Job to calculate semantic version
  jobs:
    - job: CalculateVersion
      displayName: Semantic versioning
      
      steps:
        # Checkout with persist credentials
        - checkout: self
          persistCredentials: true
  
        # Install GitVersion
        - task: gitversion/setup@0
          displayName: Install GitVersion
          inputs:
            versionSpec: '5.x'
  
        # Retrieve Pull Request Description
        - task: PullRequestDescription@0
          name: RetrievePullRequestDescription
          displayName: Retrieve Pull Request description
          inputs:
            action: 'view'
            outputVariable: 'PullRequest.DescriptionContent'
            isOutput: true
            stripIdentifiers: false
  
        # Add git commit message that will be picked up by GitVersion (&quot;+semver: patch/minor/major&quot;)
        # Depending on the Pull Request description, where the developer has marked the type of change
        - task: PowerShell@2
          displayName: Add git commit message for SemVer
          inputs:
            targetType: inline
            script: |
              Write-Host &quot;Configuring git author info..&quot; -ForegroundColor Cyan
            
              git config user.email &quot;alan.haro@blabla.com&quot;
              git config user.name &quot;alan.haro&quot;
              Write-Host &quot;Doing git checkout...&quot; -ForegroundColor Cyan
              git checkout -b $(&quot;$(System.PullRequest.SourceBranch)&quot;.replace('refs/heads/', ''))
              Write-Host &quot;Checking Pull Request description...&quot; -ForegroundColor Cyan
              $PRdesc = &quot;$(RetrievePullRequestDescription.PullRequest.DescriptionContent)&quot;
              if ($PRdesc -match '(\[x\] \bFix\b)') {
                Write-Host &quot;Adding git (empty) commit message to mark this branch as a 'patch' SemVer increment.&quot; -ForegroundColor Cyan
                git commit -a -m &quot;+semver: patch [skip azurepipelines]&quot; --allow-empty
              } elseif ($PRdesc -match '(\[x\] \bFeature\b)') {
                Write-Host &quot;Adding git (empty) commit message to mark this branch as a 'minor' SemVer increment.&quot; -ForegroundColor Cyan
                git commit -a -m &quot;+semver: minor [skip azurepipelines]&quot; --allow-empty
              } elseif ($PRdesc -match '(\[x\] \bBig\b)') {
                Write-Host &quot;Adding git (empty) commit message to mark this branch as a 'major' SemVer increment.&quot; -ForegroundColor Cyan
                git commit -a -m &quot;+semver: major [skip azurepipelines]&quot; --allow-empty
              } else {
                Write-Host &quot;##vso[task.LogIssue type=error;]Please select the type of change in the Pull Request description, and Re-queue the validation.&quot; -ForegroundColor Cyan
                $PRdesc
                exit 1
              }
              Write-Host &quot;Doing git push..&quot; -ForegroundColor Cyan
              git push --set-upstream origin $(&quot;$(System.PullRequest.SourceBranch)&quot;.replace('refs/heads/', ''))
              Write-Host &quot;Done.&quot; -ForegroundColor Cyan
            
        # Determine the semantic version
        - task: gitversion/execute@0
          displayName: Determine SemVer
  
  </code></pre>
  <p>The main idea or concept is to be able to use this tool:<a href="https://www.moderndata.ai/2021/10/automatic-semantic-versioning-in-azure-devops-with-release-notes/" rel="nofollow noreferrer"> Major, Minor, Patch  Tags</a></p>
  <p>Does anyone knows how to solve this issue?</p>