Check if a base branch requires PRs to be up to date before merging


I looked at the protection object in the response of{username}/{repo_name}/branches/master API and I can’t see any property specifying whether the rules for that branch require PR branches to be up to date before merging.

I know it’s possible to infer that information by looking at the mergeable status of a specific PR’s branch, but it would really simplify our CI script if we could extract that information directly from the base branch.

By the way, we may switch the script to use the GraphQL APIs soon. Is that information available there?

Thanks a lot,