How to determine if a PR can be merged? #24504
-
Hi folks, For instance, PullRequest mergeable_state possible values goes in a similar direction. “mergeable” only let’s me know if the PR has no potential merge conflicts. But all the other criteria like reviews, statuses, etc. would need to be queried individually. In v4 MergeStateStatus seems to be what I am looking for. But can I also achieve the same by v3 means? Thanks, |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
👋 hello there and welcome to the GitHub Support Community, @xtough !
xtough:
xtough:
I recently answered a similar question here. I’m wondering if that helps with what you’re looking for? 💭 |
Beta Was this translation helpful? Give feedback.
-
Thanks francisfuzz. Yes, this sort of helps. mergeable_state==“BLOCKED” is indeed what I was looking for. I was just confused because it is not part of the documented API. I guess the chances are small that the possible values will change incompatibly, no that the v4 API is more or less cementing the same. |
Beta Was this translation helpful? Give feedback.
-
This seems relevant: docs.github.com/en/rest/guides/using-the-rest-api-to-interact-with-your-git-database?apiVersion=2022-11-28#checking-mergeability-of-pull-requests
|
Beta Was this translation helpful? Give feedback.
👋 hello there and welcome to the GitHub Support Community, @xtough !
I recently answered a similar question here. I’m wondering if that helps with what you’re looking for? 💭