I have a sprint95 branch in Azure DevOps, in this branch I have configured Build Validation with my pipeline from a yml file that validates the code before pull request to the sprint95 branch.
However, there is a problem that this pr-unit-test-approvement check is triggered just as soon as the merge happens (e.g. into the master branch or another branch).

Or other example (this all from list pr-unit-test-approvement pipeline)

I've spent a day and a half, but still haven't found what would make the code check setup for pull request for merge start. Please help with some advice. How to exclude merge validation?
Per this build in the screenshot, it was triggered by
CI- the commit3cee7485pushed to themasterbranch rather than the PR from BranchSpint95. As soon as the code of a PR (2952) was merged into the target branchmaster, it pushed a commit (3cee7485) onto the target branch.And if any of your pipelines' reference
.ymlfile frommasterbranch enablesCItrigger, it will be triggered by any commit (including merge commit) pushed tomaster.If you don’t want this pipeline to be triggered by commits pushed to
masterbranch, please disable theCItrigger in the reference.ymlfile frommasterbranch by updatingtrigger: none. But this can only take effect onmasterbranch not all branches. You can use PR to spread this update of the.ymlfiles onto other branches.As another convenient option, you may use the pipeline's trigger settings in web UI to override the YAML
CItrigger and to disableCItrigger for all branches or enableCItrigger for selected branch(es).