How can I get last commit from GitHub API

It depends on your definition of “last”.

  • for a given branch (like master), GET /repos/:owner/:repo/commits/master is indeed the last (most recent) commit.

  • But you can also consider the last push event: that would represent the last and most recent commit done (on any branch), pushed by a user to this repo.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)