completed the commit status API

This commit is contained in:
Kohsuke Kawaguchi
2012-09-05 18:00:50 -07:00
parent 892d2acaa2
commit 3f1bb1a214
5 changed files with 59 additions and 26 deletions

View File

@@ -163,8 +163,11 @@ public class GitHub {
// append the access token
tailApiUrl = tailApiUrl + (tailApiUrl.indexOf('?')>=0 ?'&':'?') + "access_token=" + oauthAccessToken;
}
return new URL("https://api."+githubServer+tailApiUrl);
if (tailApiUrl.startsWith("/"))
return new URL("https://api."+githubServer+tailApiUrl);
else
return new URL(tailApiUrl);
}
/*package*/ <T> T retrieve(String tailApiUrl, Class<T> type) throws IOException {