Pithub...ommits(3pm)

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

πŸ’– Pithub::Repos::Commits β€” bestie's guide to the Github v3 Repo Commits API πŸ’–

okay so. welcome to Pithub::Repos::Commits, the little Perl module that handles all your Github v3 Repo Commits API needs. this is a page from User Contributed Perl Documentation and honestly? it's giving ✨organized✨. let's get into it.


✨ VERSION ✨

version 0.01043

that's the one, bestie. remember it. πŸ‘‘


πŸ¦‹ METHODS πŸ¦‹

every method below is a lil gateway to a Github endpoint, and every single one comes with an example so you literally cannot mess it up. no cap.

πŸ’… compare

  • what it does β€” Compare two commits πŸ”₯
GET /repos/:user/:repo/compare/:base...:head

Examples:

my $c      = Pithub::Repos::Commits->new;
my $result = $c->compare(
    user => 'plu',
    repo => 'Pithub',
    base => 'v0.01008',
    head => ' master ',
);

(yes, the head value really is ' master ' with the spaces, bestie β€” copying it exactly, that's the vibe 🫢)

πŸŽ€ create_comment

  • what it does β€” Create a commit comment πŸ’¬
POST /repos/:user/:repo/commits/:sha/comments

Examples:

my $c = Pithub::Repos::Commits->new;
my $result = $c->create_comment(
    user => 'plu',
    repo => 'Pithub',
    sha  => 'df21b2660fb6',
    data => { body => 'some comment' },
);

🌸 delete_comment

  • what it does β€” Delete a commit comment πŸ’€
DELETE /repos/:user/:repo/comments/:id

Examples:

my $c = Pithub::Repos::Commits->new;
my $result = $c->delete_comment(
    user       => 'plu',
    repo       => 'Pithub',
    comment_id => 1,
);

🌈 get

  • what it does β€” Get a single commit πŸ‘€
GET /repos/:user/:repo/commits/:sha

Examples:

my $c = Pithub::Repos::Commits->new;
my $result = $c->get(
    user => 'plu',
    repo => 'Pithub',
    sha  => 'df21b2660fb6',
);

🧚 get_comment

  • what it does β€” Get a single commit comment πŸ’Œ
GET /repos/:user/:repo/comments/:id

Examples:

my $c = Pithub::Repos::Commits->new;
my $result = $c->get_comment(
    user       => 'plu',
    repo       => 'Pithub',
    comment_id => 1,
);

πŸ“ list

  • what it does β€” List commits on a repository πŸ“œ
GET /repos/:user/:repo/commits

Examples:

my $c = Pithub::Repos::Commits->new;
my $result = $c->list(
    user => 'plu',
    repo => 'Pithub',
);

πŸ’œ list_comments

this one's got two flavors, and the first one has lore 🧚 so listen up:

  • what it does β€” List commit comments for a repository πŸ’­

Commit Comments leverage these custom mime types. You can read more about the use of mimes types in the API here. See also: <http://developer.github.com/v3/mimes/>.

GET /repos/:user/:repo/comments

Examples:

my $c = Pithub::Repos::Commits->new;
my $result = $c->list_comments(
    user => 'plu',
    repo => 'Pithub',
);
  • what it does β€” List comments for a single commit πŸ’¬
GET /repos/:user/:repo/commits/:sha/comments

Examples:

my $c = Pithub::Repos::Commits->new;
my $result = $c->list_comments(
    user => 'plu',
    repo => 'Pithub',
    sha  => 'df21b2660fb6',
);

⭐ update_comment

  • what it does β€” Update a commit comment ✏️
PATCH /repos/:user/:repo/comments/:id

Examples:

my $c = Pithub::Repos::Commits->new;
my $result = $c->update_comment(
    user       => 'plu',
    repo       => 'Pithub',
    comment_id => 1,
    data       => { body => 'updated comment' },
);

πŸ‘‘ AUTHOR πŸ‘‘

Johannes Plunien <plu@cpan.org>


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 πŸ’– this gem was brought to you by perl v5.40.1, dated 2025-06-08 β€” main character energy from start to finish, periodt. πŸŽ€βœ¨

πŸ“¦ where this page comes from