Get GitHub tag messages (or tags in general) through GitHub's REST API v3 without knowing the SHA

34 Views Asked by At

I'm trying to access a tag's message (essentially the image below) for use in an autoupdater section of a program I'm making.

Essentially trying to use Github APIs to get the region in red

However, in order to access the tag's message, you need to first get the SHA. Thanks to the way my code works, I can't take the easy way out and hardcode the SHA, I'll need to actively request the tag through the servers itself. And that's where my problem lies - I have no idea how I can obtain either the tag or its SHA from GitHub's servers.

To help find it, I can still get the info surrounding it, like the commit it's tied to, the ref that I had to make when making the tag via code, the name of the file, and pretty much everything short of the tag's SHA and Message.

I've tried to:

  • Get the tag using the SHA of the commit it's tied to (Got a 404)
  • Request a list of all the refs in the project, found the ref the tag is tied to, and accessing it that way (also didn't work)
  • Find a way to get its Tag object variant, and using that to get to the actual tag (didn't hold any actual data that could be used to get to the tag)
  • Use the info from the commit the tag is tied to in order to obtain the SHA and/or the tag data itself (no dice)

Is there anything I can do about this? I've been accessing the GitHub API using PyGithub.

None of the answers to Git Tag list, display commit sha1 hashes help me because I'm using an entirly different set of commands than what's given in the git command.

0

There are 0 best solutions below