PR validation pipeline without merge

632 Views Asked by At

GitHub creates a new ref when a pull request is created. The ref points to a merge commit, which is the merged code between the source and target branches of the pull request. The PR validation pipeline builds the commit this ref points to. (from here)

This causes a problem for my pipeline with Chromatic: these commits are problematic for a bunch of reasons. The biggest one is as they don't exist in the git history, we lose track of baseline acceptances you do on them.

Is there a way to configure GitHub and/or Azure DevOps build pipeline to trigger build for PR but for normal linear commit in PR branch, not merge of it with target branch?

1

There are 1 best solutions below

2
On

Is there a way to configure GitHub and/or Azure DevOps build pipeline to trigger build for PR but for normal linear commit in PR branch, not merge of it with target branch?

I am afraid there is no such way to trigger build for PR but for normal linear commit in PR branch.

Just like what you pointed, PR validation pipeline is used to build the merged code between the source and target branches.

If you do not want to build the code merge of it with target branch, you can just set the build pipeline with CI trigger enable for the source branch instead of the PR build for the PR validation pipeline.