title: Detect a build requested by pull request and one run by any updates to the PR
body: <p>I currently have a task that I intend to run only once when a PR is created. Any pipeline runs due to new commits should not trigger the task. I was wondering if there is a way to detect the runs triggered by changes to code in the PR? When I use the predefined variable <code>$(Build.Reason)</code> I get back <code>PullRequest</code> for both builds(One triggered when PR is created and other when updates are made to PR).</p>
  <p>This is what I have in my pipeline and I have enabled build validation for my pipeline.</p>
  <pre><code>trigger:
  - master
  pr:
  - master
  </code></pre>