Pithub::Repos::Hooks(3pm)

Pithub::Repos::Hooks3pm

Github v3 repo hooks api

Version

version 0.01043

Methods

create

•

Create a hook

    POST /repos/:user/:repo/hooks

Examples:

    my $hooks  = Pithub::Repos::Hooks->new;
    my $result = $hooks->create(
        user => 'plu',
        repo => 'Pithub',
        data => {
            name   => 'irc',
            active => 1,
            config => {
                server => 'irc.perl.org',
                port   => 6667,
                room   => 'pithub',
            },
        },
    );

delete

•

Delete a hook

    DELETE /repos/:user/:repo/hooks/:id

Examples:

    my $hooks  = Pithub::Repos::Hooks->new;
    my $result = $hooks->delete(
        user    => 'plu',
        repo    => 'Pithub',
        hook_id => 5,
    );

get

•

Get single hook

    GET /repos/:user/:repo/hooks/:id

Examples:

    my $hooks  = Pithub::Repos::Hooks->new;
    my $result = $hooks->get(
        user    => 'plu',
        repo    => 'Pithub',
        hook_id => 5,
    );

list

•

List Hooks

    GET /repos/:user/:repo/hooks

Examples:

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

test

•

Get single hook

    POST /repos/:user/:repo/hooks/:id/test

Examples:

    my $hooks  = Pithub::Repos::Hooks->new;
    my $result = $hooks->test(
        user    => 'plu',
        repo    => 'Pithub',
        hook_id => 5,
    );

update

•

Update/edit a hook

    PATCH /repos/:user/:repo/hooks/:id

Examples:

    my $hooks  = Pithub::Repos::Hooks->new;
    my $result = $hooks->update(
        user    => 'plu',
        repo    => 'Pithub',
        hook_id => 5,
        data    => {
            name   => 'irc',
            active => 1,
            config => {
                server => 'irc.freenode.net',
                port   => 6667,
                room   => 'pithub',
            },
        },
    );

Events

Active hooks can be configured to trigger for one or more events. The default event is push. The available events are:

•

commit_comment - Any time a Commit is commented on.

•

download - Any time a Download is added to the Repository.

•

fork - Any time a Repository is forked.

•

fork_apply - Any time a patch is applied to the Repository from the Fork Queue.

•

gollum - Any time a Wiki page is updated.

•

issues - Any time an Issue is opened or closed.

•

issue_comment - Any time an Issue is commented on.

•

member - Any time a User is added as a collaborator to a non-Organization Repository.

•

public - Any time a Repository changes from private to public.

•

pull_request - Any time a Pull Request is opened, closed, or synchronized (updated due to a new push in the branch that the pull request is tracking).

•

push - Any git push to a Repository.

•

watch - Any time a User watches the Repository.

Releases

6 releases since Debian 8 (Jessie); the text changed 5 times.

  1. 8
  2. 9
  3. 10
  4. 11
  5. 12
  6. 13

Author

Johannes Plunien <[email protected]>

From libpithub-perl 0.01043-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.