How a pull request starts a pipeline: can you still merge when it is red?

Add a pull_request trigger in the pipeline YAML, and AngusGit runs the pipeline when a pull request is opened and on later pushes, then writes the result back to Status checks on the pull request. When the pipeline fails, the merge button on the page is disabled. To make the same rule apply to the API and to administrators, put the same check name in branch protection.