Pithub...a::Tags(3pm)
π Pithub::GitData::Tags π
okay bestie, so this is Pithub::GitData::Tags β it's the Github v3 Git Data Tags API, and it's documented over in the User Contributed Perl Documentation corner of the world. Yes we're reading a .3pm page, and yes it's giving very much "let me explain tags to you before you break something" energy. π
β¨ VERSION β¨
This is version 0.01043, bestie. Write it down. π
πΈ DESCRIPTION πΈ
okay so lowkey the most important thing here: this tags api only deals with tag objects. So it's only annotated tags, not lightweight tags. Not the light ones. The full, annotated, main-character ones. π«Ά
π¦ METHODS π¦
β create β
- Create a Tag β the whole vibe of this method, no cap.
Heads up bestie, and this is important: creating a tag object does not create the reference that makes a tag in Git. Read that again. π’
So if you wanna create an annotated tag in Git, you gotta do this call to create the tag object, and then create the refs/tags/[tag] reference. Two steps, bestie, two steps. π§
And if you want a lightweight tag? You just create the reference. That's it. This call would be straight up unnecessary. Periodt. π
POST /repos/:user/:repo/git/tags
Parameters:
user: mandatory stringrepo: mandatory stringdata: mandatory hashref, having following keys:tag: mandatory string of the tagmessage: mandatory string of the tag messageobject: mandatory string of the SHA of the git object this is taggingtype: mandatory 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: mandatory hashref, having following keys:name: string of the name of the author of the tagemail: string of the email of the author of the tagdate: timestamp of when this commit was tagged
Examples:
my $t = Pithub::GitData::Tags->new;
my $result = $t->create(
user => 'plu',
repo => 'Pithub',
data => {
tagger => {
date => '2011-06-17T14:53:35-07:00',
email => 'schacon@gmail.com',
name => 'Scott Chacon',
},
message => 'initial version',
object => 'c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c',
tag => 'v0.0.1',
type => 'commit',
}
);
Response: Status: 201 Created β slay, it worked. β¨
{
"tag": "v0.0.1",
"sha": "940bd336248efae0f9ee5bc7b2d5c985887b16ac",
"url": "https://api.github.com/repos/octocat/Hello-World/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac",
"message": "initial version\n",
"tagger": {
"name": "Scott Chacon",
"email": "schacon@gmail.com",
"date": "2011-06-17T14:53:35-07:00"
},
"object": {
"type": "commit",
"sha": "c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c",
"url": "https://api.github.com/repos/octocat/Hello-World/git/commits/c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c"
}
}
π get π
- Get a Tag β the "lemme just look at this one real quick" method. π
GET /repos/:user/:repo/git/tags/:sha
Parameters:
user: mandatory stringrepo: mandatory stringsha: mandatory string
Examples:
my $t = Pithub::GitData::Tags->new;
my $result = $t->get(
user => 'plu',
repo => 'Pithub',
sha => 'df21b2660fb6',
);
Response: Status: 200 OK β iconic behaviour honestly. π
{
"tag": "v0.0.1",
"sha": "940bd336248efae0f9ee5bc7b2d5c985887b16ac",
"url": "https://api.github.com/repos/octocat/Hello-World/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac",
"message": "initial version\n",
"tagger": {
"name": "Scott Chacon",
"email": "schacon@gmail.com",
"date": "2011-06-17T14:53:35-07:00"
},
"object": {
"type": "commit",
"sha": "c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c",
"url": "https://api.github.com/repos/octocat/Hello-World/git/commits/c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c"
}
}
π AUTHOR π
Johannes Plunien <plu@cpan.org> β the legend, the moment, the icon. π«
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2011 by Johannes Plunien.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. fr fr, go wild. π«Ά
okay that's the whole page bestie, you're literally a tags expert now π
and for the cute sign-off: this was rendered by perl v5.40.1, dated 2025-06-08, and the page is Pithub...a::Tags(3pm). iykyk. π¦πΈβ¨
π¦ where this page comes from
- debian trixie: libpithub-perl 0.01043-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libpithub-perl 0.01043-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libpithub-perl 0.01043-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms