如何使用github API检查分支的可合并性 [英] How to check mergeability of a branches using the github api
问题描述
我正在尝试检查是否可以使用github API将分支合并到另一个分支.在GET /repos/:owner/:repo/pulls/:number
中有一个属性mergeable
,但是在我知道分支可以合并而不会发生冲突之前,我实际上并不想创建拉取请求.
I'm trying to check if branch can be merged to another using the github API. There is a property mergeable
in GET /repos/:owner/:repo/pulls/:number
, but I don't actually want to create a pull request before I know that branches can be merged w/o conflicts.
在github网站上,创建拉取请求时,有一个调用地址(它似乎不是API方法)(它返回HTML,表示是否可以合并分支). 但是我仍然可以使用此调用,问题是我不知道"1373893022922"指的是什么.我建议它以某种方式连接到基本分支(newdev3是head).
On the github website, when creating a pull request, there is a call to this address which doesn't seem to be an API method (it returns HTML saying whether branches can be merged or not). But still I could use this call, the problem is I have no clue what '1373893022922' refers to. I'd suggest it's somehow connected to the base branch (newdev3 is head).
有什么想法吗?
推荐答案
PR响应中现在有一个mergeable
属性.
There's now a mergeable
property in the PR response.
这篇关于如何使用github API检查分支的可合并性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!