Pithub...Labels(3pm)
π Pithub::Issues::Labels β NAME π
okay bestie, welcome to Pithub::Issues::Labels, the Github v3 Issue Labels API module from the Pithub fam. yeah, that's the whole name, we're keeping it cute and keeping it accurate. π
β¨ VERSION β¨
this is version 0.01043 β write it down, it's iconic.
π¦ METHODS π¦
every single one of these is a lil group-chat text to the GitHub API, and every one of them starts the same way, so get comfy:
my $l = Pithub::Issues::Labels->new;
that's your main character constructor. slay. π
π add
- Add labels to an issue β yes, plural labels, one issue, go off
POST /repos/:user/:repo/issues/:id/labels
Examples:
my $l = Pithub::Issues::Labels->new;
my $result = $l->add(
repo => 'Pithub',
user => 'plu',
issue_id => 1,
data => ['Label1', 'Label2'],
);
see how data is an arrayref? that's the labels going in. obsessed. π
πΈ create
- Create a label β brand new label, fresh out the box
POST /repos/:user/:repo/labels
Examples:
my $l = Pithub::Issues::Labels->new;
my $result = $l->create(
repo => 'Pithub',
user => 'plu',
data => {
color => 'FFFFFF',
name => 'some label',
}
);
color and name, both inside a hashref. that's the vibe check and it passed. β
π§ delete
- Delete a label β it's giving goodbye, no take-backs
DELETE /repos/:user/:repo/labels/:id
Examples:
my $l = Pithub::Issues::Labels->new;
my $result = $l->delete(
repo => 'Pithub',
user => 'plu',
label => 1,
);
π
get
- Get a single label β just the one, she's special
GET /repos/:user/:repo/labels/:id
Examples:
my $l = Pithub::Issues::Labels->new;
my $result = $l->get(
repo => 'Pithub',
user => 'plu',
label => 1,
);
π list
okay this one does three different things, she contains multitudes. not me being shook.
- List all labels for this repository
GET /repos/:user/:repo/labels
Examples:
my $l = Pithub::Issues::Labels->new;
my $result = $l->list(
repo => 'Pithub',
user => 'plu'
);
- List labels on an issue β pass
issue_idand it knows what you mean
GET /repos/:user/:repo/issues/:id/labels
Examples:
my $l = Pithub::Issues::Labels->new;
my $result = $l->list(
repo => 'Pithub',
user => 'plu',
issue_id => 1,
);
- Get labels for every issue in a milestone β yes, milestone girlies get their own endpoint π
GET /repos/:user/:repo/milestones/:id/labels
Examples:
my $l = Pithub::Issues::Labels->new;
my $result = $l->get(
repo => 'Pithub',
user => 'plu',
milestone_id => 1
);
π okay so real talk, the example right above literally calls->get(...)even though we're in thelistsection. that's what the source says, so that's what you get. i am not editing the queen's words. periodt.
π«Ά remove
two whole flavors of taking labels away, we love range.
- Remove a label from an issue
DELETE /repos/:user/:repo/issues/:id/labels/:id
Examples:
my $l = Pithub::Issues::Labels->new;
my $result = $l->delete(
repo => 'Pithub',
user => 'plu',
issue_id => 1,
label => 1,
);
- Remove all labels from an issue β scorched earth, no
labelkey needed
DELETE /repos/:user/:repo/issues/:id/labels
Examples:
my $l = Pithub::Issues::Labels->new;
my $result = $l->delete(
repo => 'Pithub',
user => 'plu',
issue_id => 1,
);
π and yeah, both examples in theremovesection say->delete(...). again: verbatim, bestie. iykyk.
β replace
- Replace all labels for an issue β out with the old, in with the new, glow-up arc complete
PUT /repos/:user/:repo/issues/:id/labels
Examples:
my $l = Pithub::Issues::Labels->new;
my $result = $l->replace(
repo => 'Pithub',
user => 'plu',
issue_id => 1,
data => [qw(label3 label4)],
);
π update
- Update a label β little refresh, same label, new energy
PATCH /repos/:user/:repo/labels/:id
Examples:
my $l = Pithub::Issues::Labels->new;
my $result = $l->update(
repo => 'Pithub',
user => 'plu',
label => 1,
data => {
color => 'FFFFFF',
name => 'API',
}
);
π AUTHOR π
Johannes Plunien <plu@cpan.org> β the literal legend who made this. bow. π«‘
π 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.
π and that's the whole page, bestie! brought to you by perl v5.40.1, dated 2025-06-08, and this doc lives under Pithub...Labels(3pm). go forth and label everything. no cap. πβ¨π¦
π¦ 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