Skip to content

Commit

Permalink
fix: Preventing merging without running atlantis apply on Gitlab (run…
Browse files Browse the repository at this point in the history
…atlantis#4651)

Co-authored-by: Rui Chen <[email protected]>
  • Loading branch information
2 people authored and terakoya76 committed Dec 31, 2024
1 parent 3e2f3c4 commit 6b9c5cc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions server/events/plan_command_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,12 @@ func (p *PlanCommandRunner) runAutoplan(ctx *command.Context) {
ctx.Log.Warn("unable to update plan commit status: %s", err)
}

if baseRepo.VCSHost.Type == models.Gitlab {
if err := p.commitStatusUpdater.UpdateCombinedCount(ctx.Log, ctx.Pull.BaseRepo, ctx.Pull, models.PendingCommitStatus, command.Apply, 0, len(projectCmds)); err != nil {
ctx.Log.Warn("unable to update apply commit status: %s", err)
}
}

// discard previous plans that might not be relevant anymore
ctx.Log.Debug("deleting previous plans and locks")
p.deletePlans(ctx)
Expand Down

0 comments on commit 6b9c5cc

Please sign in to comment.