GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  PITHUB::REPOS::HOOKS (3)

.ds Aq ’

NAME

Pithub::Repos::Hooks - Github v3 Repo Hooks API

CONTENTS

VERSION

version 0.01033

METHODS

    create

o 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

o 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

o 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

o List Hooks



    GET /repos/:user/:repo/hooks



Examples:



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



    test

o 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

o 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:
o commit_comment - Any time a Commit is commented on.
o download - Any time a Download is added to the Repository.
o fork - Any time a Repository is forked.
o fork_apply - Any time a patch is applied to the Repository from the Fork Queue.
o gollum - Any time a Wiki page is updated.
o issues - Any time an Issue is opened or closed.
o issue_comment - Any time an Issue is commented on.
o member - Any time a User is added as a collaborator to a non-Organization Repository.
o public - Any time a Repository changes from private to public.
o pull_request - Any time a Pull Request is opend, closed, or synchronized (updated due to a new push in the branch that the pull request is tracking).
o push - Any git push to a Repository.
o watch - Any time a User watches the Repository.

AUTHOR

Johannes Plunien <plu@cpan.org>

COPYRIGHT AND LICENSE

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.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 PITHUB::REPOS::HOOKS (3) 2016-01-22

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.