Skip to content

Commit

Permalink
[JENKINS-31462] github-api has been upgrade to 1.71
Browse files Browse the repository at this point in the history
  • Loading branch information
Manuel Recena committed Dec 3, 2015
1 parent 7bf7ae0 commit bf55ed0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
3 changes: 1 addition & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,10 @@
<artifactId>git</artifactId>
<version>2.3</version>
</dependency>
<!-- TODO: Update when org.jenkins-ci.plugins:github-api is released -->
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>github-api</artifactId>
<version>1.71-SNAPSHOT</version>
<version>1.71</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}

Expand Down

0 comments on commit bf55ed0

Please sign in to comment.