How to conditionally merge a PR on base SHA

We have dynamic status checks so don’t wish to enforce they are all present on PRs- but do wish to have the behaviour of requiring PRs be up to date with main before merge.

Is it possible to either:

  1. Branch-protect merges that are out of date (without any status checks)
  2. In the REST API merge conditional on the base SHA? Basically i’d love to assert that both head and base SHA are as-expected, and fail if either doesn’t match. It appears I can only do this today on head?

In case anyone else finds this- our current workaround is we have a status check that is always-on and always succeeds (it just echos). So we enforce that and thus get branch protection.