| title | Git Tags | GitHub API |
|---|
- TOC {:toc}
This tags API only deals with tag objects - so only annotated tags, not lightweight tags.
GET /repos/:owner/:repo/git/tags/:sha
<%= headers 200 %> <%= json :gittag %>
Note that creating a tag object does not create the reference that
makes a tag in Git. If you want to create an annotated tag in Git,
you have to do this call to create the tag object, and then create
the refs/tags/[tag] reference. If you want to create a lightweight
tag, you simply have to create the reference - this call would be
unnecessary.
POST /repos/:owner/:repo/git/tags
tag : String of the tag
message : String of the tag message
object : String of the SHA of the git object this is tagging
type
: String of the type of the object we're tagging. Normally this is a
commit but it can also be a tree or a blob.
tagger.name : String of the name of the author of the tag
tagger.email : String of the email of the author of the tag
tagger.date : Timestamp of when this object was tagged
<%= headers 201, :Location => "https://api.github.com/repos/:owner/:repo/git/tags/:sha" %> <%= json :gittag %>