Pithub...mments(3pm)

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

πŸ’– Pithub::PullRequests::Comments πŸ’–

okay bestie, welcome to Pithub::PullRequests::Comments β€” she's the Perl module (that's the 3pm part, iykyk) that lets you talk to the Github v3 Pull Request Comments API. she does comments on pull requests. she's a whole vibe. let's go πŸ¦‹


✨ VERSION ✨

version 0.01043 β€” yes queen, that's the one you're running πŸŽ€


🌸 METHODS 🌸

πŸ’… create

  • Create a comment β€” brand new comment, fresh out the box ✨
POST /repos/:user/:repo/pulls/:id/comments

Examples:

my $c = Pithub::PullRequests::Comments->new;
my $result = $c->create(
    repo            => 'Pithub',
    user            => 'plu',
    pull_request_id => 1,
    data            => {
        body      => 'Nice change',
        commit_id => '6dcb09b5b57875f334f61aebed695e2e4193db5e',
        path      => 'file1.txt',
        position  => 4,
    }
);

look at that data hash β€” body, commit_id, path, position, all of it, exactly like that. no cap. 🫢


πŸ’€ delete

  • Delete a comment β€” it's giving "we don't talk about bruno" 😭 she's gone, periodt
DELETE /repos/:user/:repo/pulls/comments/:id

Examples:

my $c = Pithub::PullRequests::Comments->new;
my $result = $c->delete(
    repo       => 'Pithub',
    user       => 'plu',
    comment_id => 1,
);
⚠️ bestie this one is DELETE. as in, actually gone. no undo button, no "oops I changed my mind" era. triple check that comment_id before you send it πŸ™ˆ

πŸ” get

  • Get a single comment β€” one comment, main character energy, no plus-ones πŸ‘‘
GET /repos/:user/:repo/pulls/comments/:id

Examples:

my $c = Pithub::PullRequests::Comments->new;
my $result = $c->get(
    repo       => 'Pithub',
    user       => 'plu',
    comment_id => 1,
);

🌈 list

  • List comments on a pull request β€” the whole group chat, every message, scrolling forever πŸ“œ
GET /repos/:user/:repo/pulls/:id/comments

Examples:

my $c = Pithub::PullRequests::Comments->new;
my $result = $c->list(
    repo            => 'Pithub',
    user            => 'plu',
    pull_request_id => 1,
);

notice she takes pull_request_id not comment_id β€” because she's listing comments on a pull request, okay? different girl, different energy πŸ’œ


πŸ¦‹ update

  • Edit a comment β€” glow-up time, we're changing the body and nothing else πŸŽ€
PATCH /repos/:user/:repo/pulls/comments/:id

Examples:

my $c = Pithub::PullRequests::Comments->new;
my $result = $c->update(
    repo       => 'Pithub',
    user       => 'plu',
    comment_id => 1,
    data       => { body => 'some updated comment' },
);

the data hash here is literally just { body => 'some updated comment' } β€” she's lowkey minimal and honestly? iconic for it ✨


πŸ’œ AUTHOR πŸ’œ

Johannes Plunien <plu@cpan.org> β€” the legend, the moment, the blueprint πŸ‘‘


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 was perl v5.40.1, dated 2025-06-08, served up fresh from Pithub...mments(3pm) β€” slay, go comment on a pull request, ily πŸ’–βœ¨

πŸ“¦ where this page comes from