As far as I know, I can prevent a PR from merging by having conflicts, by not satisfying review obligations, or by marking the commit as bad with the status API.
How can I prevent a PR from merging for custom reasons that are independent of the underlying commit? e.g. maybe I want to prevent merging of any PRs that are based on branches that are themselves open for review (since that can cause double-review of the same code). Is there any way of enforcing that these PRs don’t get merged?
The closest thing I can see right now is to add a bot as a reviewer, and try to adjust review obligations such that no PR can merge without that bot’s approval, regardless of who else has done review. I’m not even sure that that’s possible.