mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-23 02:11:01 +00:00
Merge pull request #2287 from rumyantseva/master
Log the exact error in case of 'error setting commit status'
This commit is contained in:
commit
e582c20812
3 changed files with 4 additions and 4 deletions
|
@ -301,7 +301,7 @@ func PostApproval(c *gin.Context) {
|
|||
uri := fmt.Sprintf("%s/%s/%d", httputil.GetURL(c.Request), repo.FullName, build.Number)
|
||||
err = remote_.Status(user, repo, build, uri)
|
||||
if err != nil {
|
||||
logrus.Errorf("error setting commit status for %s/%d", repo.FullName, build.Number)
|
||||
logrus.Errorf("error setting commit status for %s/%d: %v", repo.FullName, build.Number, err)
|
||||
}
|
||||
}()
|
||||
|
||||
|
@ -427,7 +427,7 @@ func PostDecline(c *gin.Context) {
|
|||
uri := fmt.Sprintf("%s/%s/%d", httputil.GetURL(c.Request), repo.FullName, build.Number)
|
||||
err = remote_.Status(user, repo, build, uri)
|
||||
if err != nil {
|
||||
logrus.Errorf("error setting commit status for %s/%d", repo.FullName, build.Number)
|
||||
logrus.Errorf("error setting commit status for %s/%d: %v", repo.FullName, build.Number, err)
|
||||
}
|
||||
|
||||
c.JSON(200, build)
|
||||
|
|
|
@ -247,7 +247,7 @@ func PostHook(c *gin.Context) {
|
|||
uri := fmt.Sprintf("%s/%s/%d", httputil.GetURL(c.Request), repo.FullName, build.Number)
|
||||
err = remote_.Status(user, repo, build, uri)
|
||||
if err != nil {
|
||||
logrus.Errorf("error setting commit status for %s/%d", repo.FullName, build.Number)
|
||||
logrus.Errorf("error setting commit status for %s/%d: %v", repo.FullName, build.Number, err)
|
||||
}
|
||||
}()
|
||||
|
||||
|
|
|
@ -428,7 +428,7 @@ func (s *RPC) Done(c context.Context, id string, state rpc.State) error {
|
|||
uri := fmt.Sprintf("%s/%s/%d", s.host, repo.FullName, build.Number)
|
||||
err = s.remote.Status(user, repo, build, uri)
|
||||
if err != nil {
|
||||
logrus.Errorf("error setting commit status for %s/%d", repo.FullName, build.Number)
|
||||
logrus.Errorf("error setting commit status for %s/%d: %v", repo.FullName, build.Number, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue