From bf55ed08514f7dd98ddbf26cb19fde2c32e9bf7c Mon Sep 17 00:00:00 2001 From: Manuel Recena Date: Thu, 3 Dec 2015 11:09:44 +0100 Subject: [PATCH] [JENKINS-31462] github-api has been upgrade to 1.71 --- pom.xml | 3 +-- .../plugins/github_branch_source/Endpoint.java | 12 ++++-------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/pom.xml b/pom.xml index a5483ce6ac..c964e33e00 100644 --- a/pom.xml +++ b/pom.xml @@ -36,11 +36,10 @@ git 2.3 - org.jenkins-ci.plugins github-api - 1.71-SNAPSHOT + 1.71 org.jenkins-ci.plugins diff --git a/src/main/java/org/jenkinsci/plugins/github_branch_source/Endpoint.java b/src/main/java/org/jenkinsci/plugins/github_branch_source/Endpoint.java index 3331d722dc..0b62bbfc55 100644 --- a/src/main/java/org/jenkinsci/plugins/github_branch_source/Endpoint.java +++ b/src/main/java/org/jenkinsci/plugins/github_branch_source/Endpoint.java @@ -104,19 +104,15 @@ public String getDisplayName() { @Restricted(NoExternalUse.class) public FormValidation doCheckApiUri(@QueryParameter String apiUri) { if (Util.fixEmptyAndTrim(apiUri) == null) { - return FormValidation.warning("You must specify the API URI"); + return FormValidation.warning("You must specify the API URL"); } try { URL api = new URL(apiUri); GitHub github = GitHub.connectToEnterpriseAnonymously(api.toString()); - if (github.isApiUrlValid()) { - return FormValidation.ok(); - } - return FormValidation.warning("This does not look like a GitHub Enterprise API URI"); - } catch (MalformedURLException mue) { - return FormValidation.error("This does not look like a GitHub Enterprise API URI"); + github.checkApiUrlValidity(); + return FormValidation.ok(); } catch (IOException e) { - return FormValidation.error(e.getMessage()); + return FormValidation.error("This does not look like a GitHub Enterprise API URL"); } }