fixed error with baseURL in github status api plugin

This commit is contained in:
Brad Rydzewski 2014-09-09 20:11:50 -07:00
parent 7b62f3ff85
commit 5c26f79940

View file

@ -95,7 +95,7 @@ func send(rawurl, host, owner, repo, status, desc, target, ref, token string) er
// the base url. Per the documentation, we need to
// ensure there is a trailing slash.
if host != model.RemoteGithub {
client.BaseURL, _ = getEndpoint(rawurl)+"/"
client.BaseURL, _ = getEndpoint(rawurl)
}
_, _, err := client.Repositories.CreateStatus(owner, repo, ref, &data)
@ -153,6 +153,6 @@ func getEndpoint(rawurl string) (*url.URL, error) {
if err != nil {
return nil, err
}
uri.Path = "/api/v3"
uri.Path = "/api/v3/"
return uri, nil
}