I am not sure need this configuration. based on my understanding, if we are using `${sha1}`, jenkins will use Github's tentative merge of the compare and base branches (e.g. refs/pull/<pull-request-id>/merge) if the PR can be automatically merged or the head of the pull request (e.g. refs/pull/<pull-request-id>/head) if they can not be automatically merged.
since we only merge a PR that all conflicts are resolved, that means the final precommit check status are on the tentative merge of the compare and base branches. Unless I misunderstood this plugin: https://github.com/jenkinsci/ghprb-plugin On Mon, Jul 23, 2018 at 11:41 PM Enrico Olivelli <eolive...@gmail.com> wrote: > Hi, > I am surprised that in our pre-commit jobs on Jenkins we are not merging > the Pull Request Branch with current master before running all > tests/checks. > > Ideally we have to simulate the final status of the repository after > merging the branch to "master" > > > This can be simply achieved but adding an "Additional behaviour" on GIT > configuration: > > Additional Behaviours - Merge Before build: > Name of repository: origin > Branch to merge to: master > Merge strategy: default > Fast forward mode: --ff > > This is the configuration which I am using for all my projects and it works > like a charm > > Am I missing something ? > If you agree I will submit a patch to change all the jobs and add this > magic trick > > Enrico >