mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-27 12:21:03 +00:00
fixed error with baseURL in github status api plugin
This commit is contained in:
parent
7b62f3ff85
commit
5c26f79940
1 changed files with 2 additions and 2 deletions
|
@ -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
|
// the base url. Per the documentation, we need to
|
||||||
// ensure there is a trailing slash.
|
// ensure there is a trailing slash.
|
||||||
if host != model.RemoteGithub {
|
if host != model.RemoteGithub {
|
||||||
client.BaseURL, _ = getEndpoint(rawurl)+"/"
|
client.BaseURL, _ = getEndpoint(rawurl)
|
||||||
}
|
}
|
||||||
|
|
||||||
_, _, err := client.Repositories.CreateStatus(owner, repo, ref, &data)
|
_, _, err := client.Repositories.CreateStatus(owner, repo, ref, &data)
|
||||||
|
@ -153,6 +153,6 @@ func getEndpoint(rawurl string) (*url.URL, error) {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
uri.Path = "/api/v3"
|
uri.Path = "/api/v3/"
|
||||||
return uri, nil
|
return uri, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue