Skip to content

Commit c51604d

Browse files
committed
Deleting unused method existsHook.
1 parent a4f167b commit c51604d

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

src/main/java/org/jenkinsci/plugins/github_branch_source/GitHubOrgWebHook.java

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,6 @@ public class GitHubOrgWebHook {
4848
private static final Logger LOGGER = Logger.getLogger(GitHubOrgWebHook.class.getName());
4949
private static final List<GHEvent> EVENTS = Arrays.asList(GHEvent.REPOSITORY, GHEvent.PUSH, GHEvent.PULL_REQUEST, GHEvent.PULL_REQUEST_REVIEW_COMMENT);
5050

51-
/**
52-
* Verify if exists a webhook by its URL.
53-
*/
54-
private static boolean existsHook(GHOrganization org, String url) throws IOException {
55-
for (GHHook hook : org.getHooks()) {
56-
if (hook.getConfig().get("url").equals(url)) {
57-
return true;
58-
}
59-
}
60-
return false;
61-
}
62-
6351
public static void register(GitHub hub, String orgName) throws IOException {
6452
String rootUrl = System.getenv("JENKINS_HOOK_URL");
6553
if (rootUrl == null) {

0 commit comments

Comments
 (0)