jenkins - github api to compare commits, response status is diverged -


when configuring jenkins, want detect feature branches whether have merging conflicts, use github api v3 test on 2 intentional conflicted branches.

after merge branch1 master, compared branch2(b2) this:

curl -i https://api.github.com/repos/hao1987/myself/compare/hao1987:master...hao1987:b2 

and returns long json has attribute:

"status": "diverged"

i wonder if means conflict, , can try types of "status"

this isn't documented (sorry!), status can 1 of 4 things:

  • "diverged" = commits introduced on both head , base branch since common ancestor
  • "ahead" = commits introduced on head after common ancestor base
  • "behind" = commits introduced on base after common ancestor head
  • "identical" = branches point same commit

so, "diverged" doesn't tell whether merge between branches result in merge conflicts.


Comments

Popular posts from this blog

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

php - render data via PDO::FETCH_FUNC vs loop -

The canvas has been tainted by cross-origin data in chrome only -