Skip to content

Commit

Permalink
Merge pull request #325 from marcb1/updating-message-when-project-is-…
Browse files Browse the repository at this point in the history
…locked

Updating message when project is locked.
  • Loading branch information
lkysow authored Oct 30, 2018
2 parents f56e06a + 189b059 commit 5a8230d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ output
.terraform/
node_modules/
**/.vuepress/dist
helm/test-values.yaml
helm/test-values.yaml
*.swp
3 changes: 2 additions & 1 deletion server/events/project_locker.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ func (p *DefaultProjectLocker) TryLock(log *logging.SimpleLogger, pull models.Pu
}
if !lockAttempt.LockAcquired && lockAttempt.CurrLock.Pull.Num != pull.Num {
failureMsg := fmt.Sprintf(
"This project is currently locked by #%d. The locking plan must be applied or discarded before future plans can execute.",
"**Unable to run `plan`**. This project is currently locked by an unapplied plan from pull #%d. To continue, delete the lock from #%d or apply that plan and merge the pull request.\n\nOnce the lock is released, comment `atlantis plan` here to re-plan.",
lockAttempt.CurrLock.Pull.Num,
lockAttempt.CurrLock.Pull.Num)
return &TryLockResponse{
LockAcquired: false,
Expand Down
2 changes: 1 addition & 1 deletion server/events/project_locker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func TestDefaultProjectLocker_TryLockWhenLocked(t *testing.T) {
Ok(t, err)
Equals(t, &events.TryLockResponse{
LockAcquired: false,
LockFailureReason: "This project is currently locked by #2. The locking plan must be applied or discarded before future plans can execute.",
LockFailureReason: "**Unable to run `plan`**. This project is currently locked by an unapplied plan from pull #2. To continue, delete the lock from #2 or apply that plan and merge the pull request.\n\nOnce the lock is released, comment `atlantis plan` here to re-plan.",
}, res)
}

Expand Down

0 comments on commit 5a8230d

Please sign in to comment.