1

Is it possible to find all untagged commits since the latest release using Github API?

xsoares
  • 13
  • 3

1 Answers1

1

First, you can get the latest release with the GitHub API (which matches the matest tag)

GET /repos/:owner/:repo/releases/latest

That means you can then compare two commits:

GET /repos/:owner/:repo/compare/:base...:head

For example: https://api.github.com/repos/git-for-windows/git/compare/v2.4.5.windows.1...master

Notes:

  1. See Working with large comparisons:

    The response will include a comparison of up to 250 commits.
    If you are working with a larger commit range, you can use the Commit List API to enumerate all commits in the range.

  2. This assume your release was done on the master branch (but you can create a release on another branch)

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250