Interface Hooks


  • @Immutable
    public interface Hooks
    Github hooks.
    Since:
    0.8
    Version:
    $Id: 1467e1e5f8481b614ca703bf68b17b13d39b6fbb $
    Author:
    Paul Polishchuk ([email protected])
    See Also:
    Hooks API
    • Method Detail

      • repo

        Repo repo()
        Owner of them.
        Returns:
        Repo
      • iterate

        Iterable<Hook> iterate()
        Iterate them all.
        Returns:
        Iterator of hooks
        See Also:
        List
      • remove

        void remove​(int number)
             throws IOException
        Remove hook by ID.
        Parameters:
        number - ID of the label to remove
        Throws:
        IOException - If there is any I/O problem
        See Also:
        List
      • get

        Hook get​(int number)
        Get specific hook by number.
        Parameters:
        number - Hook number
        Returns:
        Hook
        See Also:
        Get single hook
      • create

        Hook create​(String name,
                    Map<String,​String> config,
                    Iterable<Event> events,
                    boolean active)
             throws IOException
        Create new hook.
        Parameters:
        name - Hook name
        config - Configuration for the hook
        events - Events that trigger the hook
        active - Actually trigger the hook when the events occur?
        Returns:
        Hook
        Throws:
        IOException - If there is any I/O problem
        See Also:
        Create a hook