Skip to content

Commit

Permalink
commit status updater use DiffSummary instead Summary to show only di…
Browse files Browse the repository at this point in the history
…ff result
  • Loading branch information
krrrr38 committed Jan 19, 2023
1 parent 270cee4 commit a7ece88
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/events/commit_status_updater.go
Expand Up @@ -95,7 +95,7 @@ func (d *DefaultCommitStatusUpdater) UpdateProject(ctx command.ProjectContext, c
descripWords = genProjectStatusDescription(cmdName.String(), "failed.")
case models.SuccessCommitStatus:
if result != nil && result.PlanSuccess != nil {
descripWords = result.PlanSuccess.Summary()
descripWords = result.PlanSuccess.DiffSummary()
} else {
descripWords = genProjectStatusDescription(cmdName.String(), "succeeded.")
}
Expand Down
2 changes: 1 addition & 1 deletion server/events/commit_status_updater_test.go
Expand Up @@ -206,7 +206,7 @@ func TestDefaultCommitStatusUpdater_UpdateProject(t *testing.T) {
cmd: command.Plan,
result: &command.ProjectResult{
PlanSuccess: &models.PlanSuccess{
TerraformOutput: "aaa\nPlan: 1 to add, 2 to change, 3 to destroy.\nbbb",
TerraformOutput: "aaa\nNote: Objects have changed outside of Terraform\nbbb\nPlan: 1 to add, 2 to change, 3 to destroy.\nbbb",
},
},
expDescrip: "Plan: 1 to add, 2 to change, 3 to destroy.",
Expand Down

0 comments on commit a7ece88

Please sign in to comment.