Merge pull request #2287 from rumyantseva/master

Log the exact error in case of 'error setting commit status'
This commit is contained in:
Brad Rydzewski 2017-12-20 08:41:30 -05:00 committed by GitHub
commit e582c20812
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View file

@ -301,7 +301,7 @@ func PostApproval(c *gin.Context) {
uri := fmt.Sprintf("%s/%s/%d", httputil.GetURL(c.Request), repo.FullName, build.Number) uri := fmt.Sprintf("%s/%s/%d", httputil.GetURL(c.Request), repo.FullName, build.Number)
err = remote_.Status(user, repo, build, uri) err = remote_.Status(user, repo, build, uri)
if err != nil { 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) uri := fmt.Sprintf("%s/%s/%d", httputil.GetURL(c.Request), repo.FullName, build.Number)
err = remote_.Status(user, repo, build, uri) err = remote_.Status(user, repo, build, uri)
if err != nil { 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) c.JSON(200, build)

View file

@ -247,7 +247,7 @@ func PostHook(c *gin.Context) {
uri := fmt.Sprintf("%s/%s/%d", httputil.GetURL(c.Request), repo.FullName, build.Number) uri := fmt.Sprintf("%s/%s/%d", httputil.GetURL(c.Request), repo.FullName, build.Number)
err = remote_.Status(user, repo, build, uri) err = remote_.Status(user, repo, build, uri)
if err != nil { 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)
} }
}() }()

View file

@ -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) uri := fmt.Sprintf("%s/%s/%d", s.host, repo.FullName, build.Number)
err = s.remote.Status(user, repo, build, uri) err = s.remote.Status(user, repo, build, uri)
if err != nil { 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)
} }
} }
} }