@@ -544,15 +544,15 @@ func TestRunAutoplanCommand_DeletePlans(t *testing.T) {
544
544
defer func () { autoMerger .GlobalAutomerge = false }()
545
545
546
546
When (projectCommandBuilder .BuildAutoplanCommands (matchers .AnyPtrToEventsCommandContext ())).
547
- ThenReturn ([]models. ProjectCommandContext {
547
+ ThenReturn ([]command. ProjectContext {
548
548
{
549
- CommandName : models . PlanCommand ,
549
+ CommandName : command . Plan ,
550
550
},
551
551
{
552
- CommandName : models . PlanCommand ,
552
+ CommandName : command . Plan ,
553
553
},
554
554
}, nil )
555
- When (projectCommandRunner .Plan (matchers .AnyModelsProjectCommandContext ())).ThenReturn (models .ProjectResult {PlanSuccess : & models.PlanSuccess {}})
555
+ When (projectCommandRunner .Plan (matchers .AnyModelsProjectCommandContext ())).ThenReturn (command .ProjectResult {PlanSuccess : & models.PlanSuccess {}})
556
556
When (workingDir .GetPullDir (matchers .AnyModelsRepo (), matchers .AnyModelsPullRequest ())).ThenReturn (tmp , nil )
557
557
fixtures .Pull .BaseRepo = fixtures .GithubRepo
558
558
ch .RunAutoplanCommand (fixtures .GithubRepo , fixtures .GithubRepo , fixtures .Pull , fixtures .User )
@@ -571,14 +571,14 @@ func TestRunGenericPlanCommand_DeletePlans(t *testing.T) {
571
571
autoMerger .GlobalAutomerge = true
572
572
defer func () { autoMerger .GlobalAutomerge = false }()
573
573
574
- When (projectCommandRunner .Plan (matchers .AnyModelsProjectCommandContext ())).ThenReturn (models .ProjectResult {PlanSuccess : & models.PlanSuccess {}})
574
+ When (projectCommandRunner .Plan (matchers .AnyModelsProjectCommandContext ())).ThenReturn (command .ProjectResult {PlanSuccess : & models.PlanSuccess {}})
575
575
When (workingDir .GetPullDir (matchers .AnyModelsRepo (), matchers .AnyModelsPullRequest ())).ThenReturn (tmp , nil )
576
576
pull := & github.PullRequest {State : github .String ("open" )}
577
577
modelPull := models.PullRequest {BaseRepo : fixtures .GithubRepo , State : models .OpenPullState , Num : fixtures .Pull .Num }
578
578
When (githubGetter .GetPullRequest (fixtures .GithubRepo , fixtures .Pull .Num )).ThenReturn (pull , nil )
579
579
When (eventParsing .ParseGithubPull (pull )).ThenReturn (modelPull , modelPull .BaseRepo , fixtures .GithubRepo , nil )
580
580
fixtures .Pull .BaseRepo = fixtures .GithubRepo
581
- ch .RunCommentCommand (fixtures .GithubRepo , nil , nil , fixtures .User , fixtures .Pull .Num , & events.CommentCommand {Name : models . PlanCommand })
581
+ ch .RunCommentCommand (fixtures .GithubRepo , nil , nil , fixtures .User , fixtures .Pull .Num , & events.CommentCommand {Name : command . Plan })
582
582
pendingPlanFinder .VerifyWasCalledOnce ().DeletePlans (tmp )
583
583
locker .VerifyWasCalledOnce ().UnlockByPull (fixtures .Pull .BaseRepo .FullName , fixtures .Pull .Num )
584
584
}
@@ -594,10 +594,10 @@ func TestRunSpecificPlanCommandDoesnt_DeletePlans(t *testing.T) {
594
594
autoMerger .GlobalAutomerge = true
595
595
defer func () { autoMerger .GlobalAutomerge = false }()
596
596
597
- When (projectCommandRunner .Plan (matchers .AnyModelsProjectCommandContext ())).ThenReturn (models .ProjectResult {PlanSuccess : & models.PlanSuccess {}})
597
+ When (projectCommandRunner .Plan (matchers .AnyModelsProjectCommandContext ())).ThenReturn (command .ProjectResult {PlanSuccess : & models.PlanSuccess {}})
598
598
When (workingDir .GetPullDir (matchers .AnyModelsRepo (), matchers .AnyModelsPullRequest ())).ThenReturn (tmp , nil )
599
599
fixtures .Pull .BaseRepo = fixtures .GithubRepo
600
- ch .RunCommentCommand (fixtures .GithubRepo , nil , nil , fixtures .User , fixtures .Pull .Num , & events.CommentCommand {Name : models . PlanCommand , ProjectName : "default" })
600
+ ch .RunCommentCommand (fixtures .GithubRepo , nil , nil , fixtures .User , fixtures .Pull .Num , & events.CommentCommand {Name : command . Plan , ProjectName : "default" })
601
601
pendingPlanFinder .VerifyWasCalled (Never ()).DeletePlans (tmp )
602
602
}
603
603
0 commit comments