Interface Hooks


  • @Immutable
    public interface Hooks
    Github hooks.
    Since:
    0.8
    Version:
    $Id: 18e309202f7bc78b34bf401b7e6eb1394e4bf2a5 $
    Author:
    Paul Polishchuk (ppol@ua.fm)
    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
        Suppressed Checkstyle violations:
        ParameterNumberCheck (2 lines)