Skip to content

Commit 189b059

Browse files
committed
Updating message when project is locked.
1 parent f56e06a commit 189b059

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ output
99
.terraform/
1010
node_modules/
1111
**/.vuepress/dist
12-
helm/test-values.yaml
12+
helm/test-values.yaml
13+
*.swp

server/events/project_locker.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ func (p *DefaultProjectLocker) TryLock(log *logging.SimpleLogger, pull models.Pu
6363
}
6464
if !lockAttempt.LockAcquired && lockAttempt.CurrLock.Pull.Num != pull.Num {
6565
failureMsg := fmt.Sprintf(
66-
"This project is currently locked by #%d. The locking plan must be applied or discarded before future plans can execute.",
66+
"**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.",
67+
lockAttempt.CurrLock.Pull.Num,
6768
lockAttempt.CurrLock.Pull.Num)
6869
return &TryLockResponse{
6970
LockAcquired: false,

server/events/project_locker_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func TestDefaultProjectLocker_TryLockWhenLocked(t *testing.T) {
5252
Ok(t, err)
5353
Equals(t, &events.TryLockResponse{
5454
LockAcquired: false,
55-
LockFailureReason: "This project is currently locked by #2. The locking plan must be applied or discarded before future plans can execute.",
55+
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.",
5656
}, res)
5757
}
5858

0 commit comments

Comments
 (0)