title: How do I restrict pipelines to specific branches without using triggers?
body: <p>How can I restrict on-demand (i.e. not triggered) pipelines in Azure DevOps so that they only run on specific branches?</p>
  <p>For instance, I have a pipeline (using the newer YAML syntax) that should only run on the <code>master</code> branch, as it is used to push code through to production, and can only be run by certain developers (we handle a lot of PII data, so our audit controls are fairly demanding). I have another pipeline that should run on any branch <em>except</em> <code>master</code>, as it is used to push code through to integration/testing environments, and can be run by anyone.</p>
  <p>If I specified a trigger, I can tell it only to fire on certain branches; but if I set <code>trigger: none</code> in my YAML then I can't apply those restrictions. Any ideas?</p>