Updating message when project is locked.

This commit is contained in:
marc bassil
2018-10-26 14:03:08 -04:00
parent f56e06a578
commit 189b0591ef
3 changed files with 5 additions and 3 deletions

3
.gitignore vendored
View File

@@ -9,4 +9,5 @@ output
.terraform/
node_modules/
**/.vuepress/dist
helm/test-values.yaml
helm/test-values.yaml
*.swp

View File

@@ -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,

View File

@@ -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)
}