Pithub...tatuses(3pm)

πŸ“¦
version 0.01043 Β· 4 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

πŸ’– Pithub::Repos::Statuses β€” the manual, but make it cute πŸ’–

okay bestie, sit down, hydrate, and let me tell you about Pithub::Repos::Statuses β€” it's the Github v3 repos / statuses API module, and it is literally the main character of your CI pipeline. ✨

It's from Pithub...tatuses(3pm), which is the perl manual-page situation, so if you ever need to find it again: that's the name. iykyk 🫢


🌸 VERSION 🌸

version 0.01043 β€” yes, a real number, no cap. πŸŽ€


✨ METHODS ✨

πŸ¦‹ list

okay so first up, the extra arguments you can pass, and there is exactly one (1):

  • ref β€” the SHA, branch, or tag-name you wanna get statuses for. that's it, that's the whole list. πŸ’…

What it does: list statuses for a ref. that's the vibe.

Here's the endpoint it hits, verbatim, don't touch it:

GET /repos/:user/:repo/statuses/:ref

Examples, bestie β€” copy these exactly:

my $statuses = Pithub::Repos::Statuses->new;
my $result   = $statuses->list( ref => 'master' );

slay. that's it. iconic. ✨


🌈 create

okay now the spicy one. extra arguments first:

  • state β€” required, btw, not optional, do not skip it, the API will simply not be having it. it's the state of the status, and it can be one of 'pending', 'success', 'error' or 'failure'. those four. periodt. πŸ‘‘
  • target_url β€” this URL gets used to link from the status to some related page β€” like, for instance, the build result for this specific SHA. so you can click straight through to whatever drama went down. πŸ”₯
  • description β€” a short description of the status. keep it brief, bestie, it's a description not a novel. πŸ’€

What it does: add a status to a SHA.

Endpoint, verbatim:

POST /repos/:user/:repo/statuses/:sha

Examples, and yes the formatting is exactly like this, don't @ me:

my $statuses = Pithub::Repos::Statuses->new;
my $result   = $statuses->create( user => 'plu', repo => 'Pithub',
    sha => '0123456',
    data => {
        state => 'error',
        description => 'Build failed',
        target_url => 'https://travis-ci.org/some/url/0123456',
    },
);

look at that nested hashref. it's giving structured data. it's giving error / Build failed. honestly obsessed. πŸ“


πŸ‘‘ AUTHOR πŸ‘‘

Johannes Plunien <plu@cpan.org> β€” the actual legend who wrote this. show some respect, bestie. πŸ’œ


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, free as in go wild, just keep the same terms. 🌸


and that's the whole page, bestie!! 🫢 you read all of it. so proud. the footer energy was perl v5.40.1, dated 2025-06-08, filed under Pithub...tatuses(3pm) β€” consider that your cute little sign-off, mwah. πŸ’–βœ¨πŸ§š

πŸ“¦ where this page comes from