From 8d1b44db9781f5a191db534cd1950de7fbd20ed6 Mon Sep 17 00:00:00 2001 From: Kanstantsin Shautsou Date: Mon, 10 Jul 2017 02:39:03 +0300 Subject: [PATCH] Add ping hook method --- src/main/java/org/kohsuke/github/GHHook.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/org/kohsuke/github/GHHook.java b/src/main/java/org/kohsuke/github/GHHook.java index 73b2eb4364..4aa32e1946 100644 --- a/src/main/java/org/kohsuke/github/GHHook.java +++ b/src/main/java/org/kohsuke/github/GHHook.java @@ -41,6 +41,13 @@ public Map getConfig() { return Collections.unmodifiableMap(config); } + /** + * @see Ping hook + */ + public void ping() throws IOException { + new Requester(getRoot()).method("POST").to(getApiRoute() + "/pings"); + } + /** * Deletes this hook. */