Forum Discussion
azdataguy
Aug 21, 2023Copper Contributor
Require latest target branch to be merged as PR check
Hi, we are using feature branches actively. Each branch is merged via a PR. For a to PR to be merged we run extensive build validations (e.g. build the solution, deploy it, execute it, destroy i...
Kidd_Ip
Jul 18, 2025MVP
Azure DevOps PR validations typically run against the result of merging the source branch into the target, not the source branch itself, which means:
- The build may pass even if the source branch is outdated.
- Conflicts are only surfaced at merge time, and the PR author isn't forced to resolve them beforehand.
You may try a workaround as Use Build Expiration Policy:
Simulate this behavior using Build Validation + Build Expiration:
- Enable Build Validation on your target branch.
- Set Build Expiration to “Immediately when the target branch is updated”
This forces the PR build to fail if the target branch has changed since the last successful build, nudging the developer to rebase or merge the latest target branch into their feature branch.