title: Azure Pipelines - Build.SourceVersionMessage variable not working in expression function
body: <p>I'm trying to insert an extra parameter in my pipeline based on a commit message fragment, running Azure DevOps Server 2020. I tried to implement it with the following code, without luck:</p>
  <pre class="lang-yaml prettyprint-override"><code>variables:
    - name: commitMessage
      value: $(Build.SourceVersionMessage)
  steps:
    - template: myTemplate.yaml
      parameters:
        ${{ if contains(variables['commitMessage'], 'SPECIAL_MESSAGE') }}:
          specialParam: 'someValue'
  </code></pre>
  <p>During investigation, I found that the expressions behave somewhat unexpected:</p>
  <pre class="lang-yaml prettyprint-override"><code>variables:
    - name: commitMessage
      value: $(Build.SourceVersionMessage)
  steps:
    - bash: | 
        echo &quot;${{ variables['commitMessage'] }}&quot;
        echo &quot;${{ contains(variables['commitMessage'], 'SPECIAL_MESSAGE') }}&quot;
        echo &quot;${{ contains('test SPECIAL_MESSAGE', 'SPECIAL_MESSAGE') }}&quot;
  </code></pre>
  <p>The script output is:</p>
  <pre><code>test SPECIAL_MESSAGE
  False
  True
  </code></pre>
  <p>The first line of the script outputs the commit message correctly. But the <code>contains()</code> function in the second line of the script seems to be unable to process the variable, even though the commit message contains the SPECIAL_MESSAGE, the expression returns <code>False</code>.</p>
  <p>However, if I set my variable to a static string instead of the <code>$(Build.SourceVersionMessage)</code> variable, the expression returns <code>True</code>, and I am able to add the extra parameter:</p>
  <pre><code>variables:
    - name: commitMessage
      value: 'test SPECIAL_MESSAGE'
  </code></pre>
  <p>Any idea why the pipeline behaves like this, or how to make it work?</p>