Skip to content

Commit

Permalink
Merge pull request #84 from runatlantis/log-status
Browse files Browse the repository at this point in the history
Log if err updating commit status.
  • Loading branch information
lkysow authored Mar 23, 2018
2 parents 0ad25e6 + 102d3f6 commit 9615702
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions server/events/command_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ func (c *CommandHandler) run(ctx *CommandContext) {
return
}

c.CommitStatusUpdater.Update(ctx.BaseRepo, ctx.Pull, vcs.Pending, ctx.Command, ctx.VCSHost) // nolint: errcheck
if err := c.CommitStatusUpdater.Update(ctx.BaseRepo, ctx.Pull, vcs.Pending, ctx.Command, ctx.VCSHost); err != nil {
ctx.Log.Warn("unable to update commit status: %s", err)
}
if !c.AtlantisWorkspaceLocker.TryLock(ctx.BaseRepo.FullName, ctx.Command.Workspace, ctx.Pull.Num) {
errMsg := fmt.Sprintf(
"The %s workspace is currently locked by another"+
Expand Down Expand Up @@ -191,7 +193,9 @@ func (c *CommandHandler) updatePull(ctx *CommandContext, res CommandResponse) {
}

// Update the pull request's status icon and comment back.
c.CommitStatusUpdater.UpdateProjectResult(ctx, res) // nolint: errcheck
if err := c.CommitStatusUpdater.UpdateProjectResult(ctx, res); err != nil {
ctx.Log.Warn("unable to update commit status: %s", err)
}
comment := c.MarkdownRenderer.Render(res, ctx.Command.Name, ctx.Log.History.String(), ctx.Command.Verbose)
c.VCSClient.CreateComment(ctx.BaseRepo, ctx.Pull.Num, comment, ctx.VCSHost) // nolint: errcheck
}
Expand Down

0 comments on commit 9615702

Please sign in to comment.