From 63a6e6450e2f5a9efaab6f6811ce32c3d2cf5dc7 Mon Sep 17 00:00:00 2001 From: Radon Rosborough <69264599+raxod502-plaid@users.noreply.github.com> Date: Thu, 28 Jan 2021 10:45:57 -0800 Subject: [PATCH] Pass atlantis/apply when there are no plans (#1323) --- server/events/command_runner.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/server/events/command_runner.go b/server/events/command_runner.go index 05f694962..25489122b 100644 --- a/server/events/command_runner.go +++ b/server/events/command_runner.go @@ -150,13 +150,16 @@ func (c *DefaultCommandRunner) RunAutoplanCommand(baseRepo models.Repo, headRepo if len(projectCmds) == 0 { log.Info("determined there was no project to run plan in") if !c.SilenceVCSStatusNoPlans { - // If there were no projects modified, we set a successful commit status - // with 0/0 projects planned successfully because some users require + // If there were no projects modified, we set successful commit statuses + // with 0/0 projects planned/applied successfully because some users require // the Atlantis status to be passing for all pull requests. ctx.Log.Debug("setting VCS status to success with no projects found") if err := c.CommitStatusUpdater.UpdateCombinedCount(baseRepo, pull, models.SuccessCommitStatus, models.PlanCommand, 0, 0); err != nil { ctx.Log.Warn("unable to update commit status: %s", err) } + if err := c.CommitStatusUpdater.UpdateCombinedCount(baseRepo, pull, models.SuccessCommitStatus, models.ApplyCommand, 0, 0); err != nil { + ctx.Log.Warn("unable to update commit status: %s", err) + } } return }