Interface Hooks


@Immutable public interface Hooks
GitHub hooks.
Since:
0.8
See Also:
  • Method Details

    • repo

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

      Iterable<Hook> iterate()
      Iterate them all.
      Returns:
      Iterator of hooks
      See Also:
    • 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:
    • get

      Hook get(int number)
      Get specific hook by number.
      Parameters:
      number - Hook number
      Returns:
      Hook
      See Also:
    • 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:
      Suppressed Checkstyle violations:
      ParameterNumberCheck (2 lines)