Is there any way using Github API i can get all the branches which contain a specific commit.?
Thanks for being here! I don't think there is a more elegant way to accomplish this than the following:
/repos/:owner/:repo/commits?sha=branchname, where branchname is the name of the branch you want to fetch commits for e.g.
I'll dig a little deeper and see if there is any other way,
Mark helpful posts with Accept as Solution to help other users locate important info. Don't forget to give Kudos for great content!
@AndreaGriffiths11 For a repo having thousand of commits the process of iterating through will be too slow. Is there a better way to do this?
I know, Github Web UI uses an internal API to do this. for eg.
Is that trustworthy?
I think Github should expose this as a rest API.