Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does pull request in Azure devops merge the code and then runs the build definition

I have feature branch feature/feature1 and dev branch. I created a branch policy for dev branch where I have selected a build definition.

When I initiate a pull request from feature/feature1 to dev does it merge the 2 branches and then does the build? Or does it just build feature/feature1?

 * [new branch]      dev                -> origin/dev
 * [new branch]      feature/feature2   -> origin/feature/feature2
 * [new branch]      feature/test       -> origin/feature/test
 * [new branch]      master             -> origin/master
 * [new branch]      release/release-1  -> origin/release/release-1
 * [new branch]      release/release-2  -> origin/release/release-2
 * [new ref]         refs/pull/37/merge -> pull/37/merge
##[command]git checkout --progress --force refs/remotes/pull/37/merge
Note: checking out 'refs/remotes/pull/37/merge'.
like image 821
kumar Avatar asked Oct 27 '25 17:10

kumar


1 Answers

A pull request will always perform a merge into a temporary space in order to validate that the code in your source branch and the code in the target branch do not conflict. If there are merge conflicts, you will be unable to complete the pull request.

If you have a pull request validation build configured, then this temporary result of the merge will also be built. The contents of your branch are not built, only the result of the merge.

However this temporary merge result is discarded after checks run.

When you complete the pull request, your source branch will actually be merged into the target.

like image 146
Edward Thomson Avatar answered Oct 30 '25 15:10

Edward Thomson