I am experimenting with GitHub API using octokit ruby gem. My goal is to be able to extract the 'tag' that a commit SHA belongs to.
Now I can easily do this on command line using
> git describe 688ae0b --tags
and get output
> 3.0.1-122-g688ae0b
which tells me Tag, commits since tags, and last commit hash.
How do I get same info from GitHub API?
Answers using GitHub API or Octokit client would both do, as I can translate from one other just fine.
I have looked at a bunch of things like, releases, tags, commits etc.. but none of them give me this information that I can get in one line from command line.
I am not looking for 'how to use github api'. I am looking for specific request or set of requests that will let me derive this information.