How can you check if the latest branch commit has been pushed into the master via the Github API?
Asked
Active
Viewed 100 times
1 Answers
0
That would be the GitHub API "Refs"
GET /repos/:owner/:repo/git/refs/:ref
I showed (in 2015) a more complete example here.
But don't forget a simple git ls-remote would also show you the latest commits of the remote repo branches.
Compare that with "How to retrieve the hash for the current commit in Git?"
git rev-parse master
And you can check if that local master
HEAD commit has been pushed or not.

VonC
- 1,262,500
- 529
- 4,410
- 5,250
-
@JaySlack I have edited the answer to address your comment. – VonC May 04 '19 at 17:48