github - Get git commits by branch name\id with git api -
i working on automated service work git hub repositories. , having problem on side - can't find way commit in particular branch hash\name.
my code automated tool make code reviewes. i've added feature ignore particular branch in review process (ex. testing branch or that). in service marking branch ignored. once commits git hub api - there no information there branch current commit belongs to.
i started thinking overall github idea wrong - since commit-branch link pretty obvious thing there should made api developers ignore in getcommits method
so question - there way find out branch commit (using v3 api json result) belongs in github api (v3 - /repos/:owner/:repo/commits/:sha).
thanks
if want check if commit example on branch test123, do:
https://api.github.com/repos/golang/go/compare/test123...001a75a74c4a27901b0b536efe1be581612c52a9
and check status.
if it's 'identical' or 'behind', commit part of branch. if different, it's not.
Comments
Post a Comment