How to trigger action base on 'merge pull request' button BUT not merge!

We went through a CI scenario documented in open source

  1. create pull request built by CI code change 1 by deanhiller · Pull Request #15 · deanhiller/webpieces · GitHub
  2. create pull request built by CI pull request 2 to demonstrate conflict by deanhiller · Pull Request #16 · deanhiller/webpieces · GitHub

together these would fail, but they succeed fine independently. We then click ‘merge pull request’ BUT this does NOT GOT THROUGH CI!!! - UGH. Clicking merge pull request on #2 would have failed and been rejected and not put on master.

My Question is thus:
Can we make it so merge pull request triggers CI but does NOT merge changes into master since we have the CI system do the merge to master IF the build passes?

Today, we do not and cannot use pull requests because it allows master to break. We operate on never allowing master to be broken by only letting CI merge into master after a working build.

Are you possibly looking for the “Require branches to be up to date before merging” setting? See Require status checks before merging. That should prevent merges if the status tests haven’t run with the latest state of the target branch. I think expecting the merge button to not merge would be confusing. :slightly_smiling_face: