diff --git a/runatlantis.io/docs/apply-requirements.md b/runatlantis.io/docs/apply-requirements.md index a79d40569..a781a151f 100644 --- a/runatlantis.io/docs/apply-requirements.md +++ b/runatlantis.io/docs/apply-requirements.md @@ -5,7 +5,7 @@ Atlantis allows you to require certain conditions be satisfied **before** an `atlantis apply` command can be run: -* [Approved](#approved) – requires pull requests to be approved by at least one user +* [Approved](#approved) – requires pull requests to be approved by at least one user other than the author * [Mergeable](#mergeable) – requires pull requests to be able to be merged ## What Happens If The Requirement Is Not Met? diff --git a/server/events/project_command_runner.go b/server/events/project_command_runner.go index a5efbbd37..1c84f2487 100644 --- a/server/events/project_command_runner.go +++ b/server/events/project_command_runner.go @@ -234,7 +234,7 @@ func (p *DefaultProjectCommandRunner) doApply(ctx models.ProjectCommandContext) return "", "", errors.Wrap(err, "checking if pull request was approved") } if !approved { - return "", "Pull request must be approved before running apply.", nil + return "", "Pull request must be approved by at least one person other than the author before running apply.", nil } case raw.MergeableApplyRequirement: if !ctx.PullMergeable { diff --git a/server/events/project_command_runner_test.go b/server/events/project_command_runner_test.go index 0360d8ebc..7c09bd284 100644 --- a/server/events/project_command_runner_test.go +++ b/server/events/project_command_runner_test.go @@ -162,7 +162,7 @@ func TestDefaultProjectCommandRunner_ApplyNotApproved(t *testing.T) { When(mockApproved.PullIsApproved(ctx.BaseRepo, ctx.Pull)).ThenReturn(false, nil) res := runner.Apply(ctx) - Equals(t, "Pull request must be approved before running apply.", res.Failure) + Equals(t, "Pull request must be approved by at least one person other than the author before running apply.", res.Failure) } // Test that if mergeable is required and the PR isn't mergeable we give an error.