How to check mergeability of a branches using the github api

老子叫甜甜 提交于 2019-12-05 01:25:31

There's now a mergeable property in the PR response.

There's no easy way (it seems) to do this. Your best bet is to attempt to merge the two branches using the Merging API but that would result in a merge if in fact the two branches are mergeable. I suspect that's not what you're looking for.

You could also clone the repository and just those two branches and refer to some other questions here on StackOverflow that address whether two branches are fast-forwardable. That may be a more reliable way of determining this.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!