Pithub::Repos(3pm)

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

πŸ’– NAME πŸ’–

Pithub::Repos β€” bestie, it's the Github v3 Repos API πŸ’… (that's the manual page Pithub::Repos(3pm), Perl-flavored, and she's iconic).

✨ VERSION ✨

version 0.01043 β€” yes, she's got a version number and she's proud of it πŸŽ€


πŸ¦‹ METHODS πŸ¦‹

okay so here's the whole menu, no skips, no skimming, we're doing all of them 🌸

actions

Gives you the keys to Pithub::Repos::Actions. That's it, that's the whole vibe ✨

branch

Get the tea on one single branch. Just the one. She's the main character πŸ‘‘

GET /repos/:owner/:repo/branches/:branch

Example, copy it exactly bestie:

my $result = Pithub->new->branch(
    user => 'plu',
    repo => 'Pithub',
    branch => "master"
);
also peep branches if you want the whole list of branches, not just this one 🫢

branches

  • List Branches 🌈
GET /repos/:user/:repo/branches

Examples:

my $repos  = Pithub::Repos->new;
my $result = $repos->branches( user => 'plu', repo => 'Pithub' );
want just one of them? that's branch, go look at her πŸ’…

rename_branch

  • Rename a branch β€” glow-up for a branch name, literally ✨
POST /repos/:user/:repo/branches/:branch/rename

Examples:

my $b = Pithub::Repos->new;
my $result = $b->rename_branch(
    user => 'plu',
    repo => 'Pithub',
    branch  => 'travis',
    data => { new_name => 'travis-ci' }
);

merge_branch

  • Merge a branch β€” two branches becoming one, it's giving soulmates πŸ˜­πŸ’–
POST /repos/:user/:repo/merges

Examples:

my $b = Pithub::Repos->new;
my $result = $b->rename_branch(
    user => 'plu',
    repo => 'Pithub',
    data => { base => 'master', head => 'travis', message => 'My commit message' }
);

collaborators

Access to Pithub::Repos::Collaborators β€” the besties you build with 🫢

commits

Access to Pithub::Repos::Commits β€” the receipts πŸ“œ

contents

Access to Pithub::Repos::Contents β€” what's actually inside πŸ“‚

contributors

  • List contributors 🌟
GET /repos/:user/:repo/contributors

Examples:

my $repos  = Pithub::Repos->new;
my $result = $repos->contributors( user => 'plu', repo => 'Pithub' );

create

  • Create a new repository for the authenticated user. ✨ new repo smell ✨
POST /user/repos

Examples:

my $repos  = Pithub::Repos->new;
my $result = $repos->create( data => { name => 'some-repo' } );
  • Create a new repository in this organization. The authenticated user must be a member of this organization. πŸ‘‘ (fr fr, you gotta be in the group chat first)
POST /orgs/:org/repos

Examples:

my $repos  = Pithub::Repos->new;
my $result = $repos->create(
    org  => 'CPAN-API',
    data => { name => 'some-repo' }
);

delete

Delete a repository. πŸ’€ gone, deleted, no takebacks.

DELETE /repos/:owner/:repo

downloads

Access to Pithub::Repos::Downloads πŸ“₯

forks

Access to Pithub::Repos::Forks 🍴

get

  • Get a repo πŸ’…
GET /repos/:user/:repo

Examples:

my $repos  = Pithub::Repos->new;
my $result = $repos->get( user => 'plu', repo => 'Pithub' );

hooks

Access to Pithub::Repos::Hooks πŸͺ

issues

Access to Pithub::Issues for this repo πŸ›

keys

Access to Pithub::Repos::Keys πŸ”‘

languages

  • List languages πŸ—£οΈ
GET /repos/:user/:repo/languages

Examples:

my $repos  = Pithub::Repos->new;
my $result = $repos->languages( user => 'plu', repo => 'Pithub' );

list

  • List repositories for the authenticated user. 🫢
GET /user/repos

Examples:

my $repos  = Pithub::Repos->new;
my $result = $repos->list;
  • List public repositories for the specified user. 🌈
GET /users/:user/repos

Examples:

my $repos  = Pithub::Repos->new;
my $result = $repos->list( user => 'plu' );
  • List repositories for the specified org. πŸ‘‘
GET /orgs/:org/repos

Examples:

my $repos  = Pithub::Repos->new;
my $result = $repos->list( org => 'CPAN-API' );

markdown

Access to Pithub::Markdown, and the way it works is it sets the current repository as the default context. It also sets the mode to default to 'gfm'. Periodt πŸ’…

pull_requests

Access to Pithub::PullRequests 🫢

releases

Access to Pithub::Repos::Releases πŸŽ‰

starring

Access to Pithub::Repos::Starring ⭐

stats

Provide access to Pithub::Repos::Stats πŸ“Š

statuses

Provide access to Pithub::Repos::Statuses 🚦

tags

  • List Tags 🏷️
GET /repos/:user/:repo/tags

Examples:

my $repos  = Pithub::Repos->new;
my $result = $repos->tags( user => 'plu', repo => 'Pithub' );

teams

  • List Teams πŸ‘―
GET /repos/:user/:repo/teams

Examples:

my $repos  = Pithub::Repos->new;
my $result = $repos->teams( user => 'plu', repo => 'Pithub' );

update

  • Edit ✏️
PATCH /repos/:user/:repo

Examples:

# update a repo for the authenticated user
my $repos  = Pithub::Repos->new;
my $result = $repos->update(
    repo => 'Pithub',
    data => { description => 'Github API v3' },
);

watching

Access to Pithub::Repos::Watching πŸ‘€


🌸 AUTHOR 🌸

Johannes Plunien <plu@cpan.org> β€” the icon who wrote all this πŸ’œ

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, ily, go ship some repos πŸ¦‹βœ¨ β€” this was perl v5.40.1, dated 2025-06-08, for Pithub::Repos(3pm). slay πŸ’…

πŸ“¦ where this page comes from