@@ -395,7 +395,7 @@ eventLoopSpec = parallel $ do
395
395
[
396
396
Logic. PullRequestOpened pr4 branch baseBranch c4 " Add Leon test results" " deckard" ,
397
397
Logic. CommentAdded pr4 " rachael" " @bot merge" ,
398
- Logic. BuildStatusChanged c4 BuildSucceeded
398
+ Logic. BuildStatusChanged [ Branch " integration/4 " ] c4 BuildSucceeded
399
399
]
400
400
history `shouldBe`
401
401
[ " * c4"
@@ -424,7 +424,7 @@ eventLoopSpec = parallel $ do
424
424
[
425
425
Logic. PullRequestOpened pr4 branch baseBranch c4 " Add Leon test results" " deckard" ,
426
426
Logic. CommentAdded pr4 " rachael" " @bot merge" ,
427
- Logic. BuildStatusChanged c4 (BuildFailed Nothing )
427
+ Logic. BuildStatusChanged [ Branch " integration/4 " ] c4 (BuildFailed Nothing )
428
428
]
429
429
-- the build failed, so master's history is unchanged
430
430
-- ... and the integration/4 branch is kept for inpection of the CI build
@@ -451,7 +451,7 @@ eventLoopSpec = parallel $ do
451
451
[
452
452
Logic. PullRequestOpened pr4 branch baseBranch c4 " Deploy tests!" " deckard" ,
453
453
Logic. CommentAdded pr4 " rachael" " @bot merge and tag" ,
454
- Logic. BuildStatusChanged c4 BuildSucceeded
454
+ Logic. BuildStatusChanged [ Branch " integration/4 " ] c4 BuildSucceeded
455
455
]
456
456
history `shouldBe`
457
457
[ " * c4"
@@ -505,7 +505,7 @@ eventLoopSpec = parallel $ do
505
505
506
506
-- The rebased commit should have been pushed to the remote repository
507
507
-- 'integration' branch. Tell that building it succeeded.
508
- void $ runLoop state [Logic. BuildStatusChanged rebasedSha BuildSucceeded ]
508
+ void $ runLoop state [Logic. BuildStatusChanged [ Branch " integration/4 " ] rebasedSha BuildSucceeded ]
509
509
510
510
history `shouldBe`
511
511
[ " * Merge #4"
@@ -563,7 +563,7 @@ eventLoopSpec = parallel $ do
563
563
564
564
-- The rebased commit should have been pushed to the remote repository
565
565
-- 'integration' branch. Tell that building it succeeded.
566
- void $ runLoop state [Logic. BuildStatusChanged rebasedSha BuildSucceeded ]
566
+ void $ runLoop state [Logic. BuildStatusChanged [ Branch " integration/6 " ] rebasedSha BuildSucceeded ]
567
567
568
568
history `shouldBe`
569
569
[ " * Merge #6"
@@ -600,7 +600,7 @@ eventLoopSpec = parallel $ do
600
600
601
601
let [rebasedSha] = integrationShas state
602
602
603
- void $ runLoop state [Logic. BuildStatusChanged rebasedSha BuildSucceeded ]
603
+ void $ runLoop state [Logic. BuildStatusChanged [ Branch " integration/6 " ] rebasedSha BuildSucceeded ]
604
604
605
605
history `shouldBe`
606
606
[ " * Merge #6"
@@ -658,7 +658,7 @@ eventLoopSpec = parallel $ do
658
658
659
659
let [rebasedSha] = integrationShas state
660
660
661
- void $ runLoop state [Logic. BuildStatusChanged rebasedSha BuildSucceeded ]
661
+ void $ runLoop state [Logic. BuildStatusChanged [ Branch " integration/6 " ] rebasedSha BuildSucceeded ]
662
662
663
663
history `shouldBe`
664
664
[ " * Merge #6"
@@ -722,12 +722,12 @@ eventLoopSpec = parallel $ do
722
722
723
723
-- The rebased commit should have been pushed to the remote repository
724
724
-- 'integration' branch. Tell that building it succeeded.
725
- state' <- runLoop state [Logic. BuildStatusChanged rebasedSha BuildSucceeded ]
725
+ state' <- runLoop state [Logic. BuildStatusChanged [ Branch " integration/6 " ] rebasedSha BuildSucceeded ]
726
726
727
727
-- Repeat for the other pull request, which should be the candidate by
728
728
-- now.
729
729
let [rebasedSha'] = integrationShas state'
730
- void $ runLoop state' [Logic. BuildStatusChanged rebasedSha' BuildSucceeded ]
730
+ void $ runLoop state' [Logic. BuildStatusChanged [ Branch " integration/4 " ] rebasedSha' BuildSucceeded ]
731
731
732
732
history `shouldBe`
733
733
[ " * c4"
@@ -761,10 +761,10 @@ eventLoopSpec = parallel $ do
761
761
762
762
let [rebasedSha] = integrationShas state
763
763
764
- state' <- runLoop state [Logic. BuildStatusChanged rebasedSha BuildSucceeded ]
764
+ state' <- runLoop state [Logic. BuildStatusChanged [ Branch " integration/6 " ] rebasedSha BuildSucceeded ]
765
765
766
766
let [rebasedSha'] = integrationShas state'
767
- void $ runLoop state' [Logic. BuildStatusChanged rebasedSha' BuildSucceeded ]
767
+ void $ runLoop state' [Logic. BuildStatusChanged [ Branch " integration/4 " ] rebasedSha' BuildSucceeded ]
768
768
769
769
history `shouldBe`
770
770
[ " * c4"
@@ -886,15 +886,15 @@ eventLoopSpec = parallel $ do
886
886
-- Extract the sha of the rebased commit from the project state, and
887
887
-- tell the loop that building the commit succeeded.
888
888
let [rebasedSha] = integrationShas state
889
- state' <- runLoop state [Logic. BuildStatusChanged rebasedSha BuildSucceeded ]
889
+ state' <- runLoop state [Logic. BuildStatusChanged [ Branch " integration/6 " ] rebasedSha BuildSucceeded ]
890
890
891
891
-- The push should have failed, hence there should still be an
892
892
-- integration candidate.
893
893
Project. integratedPullRequests state' `shouldSatisfy` (not . null )
894
894
895
895
-- Again notify build success, now for the new commit.
896
896
let [rebasedSha'] = integrationShas state'
897
- state'' <- runLoop state' [Logic. BuildStatusChanged rebasedSha' BuildSucceeded ]
897
+ state'' <- runLoop state' [Logic. BuildStatusChanged [ Branch " integration/6 " ] rebasedSha' BuildSucceeded ]
898
898
899
899
-- After the second build success, the pull request should have been
900
900
-- integrated properly, so there should not be a new candidate.
@@ -937,11 +937,11 @@ eventLoopSpec = parallel $ do
937
937
git [" push" , " origin" , refSpec (c4, masterBranch)]
938
938
939
939
let [rebasedSha] = integrationShas state
940
- state' <- runLoop state [Logic. BuildStatusChanged rebasedSha BuildSucceeded ]
940
+ state' <- runLoop state [Logic. BuildStatusChanged [ Branch " integration/6 " ] rebasedSha BuildSucceeded ]
941
941
942
942
-- Again notify build success, now for the new commit.
943
943
let [rebasedSha'] = integrationShas state'
944
- void $ runLoop state' [Logic. BuildStatusChanged rebasedSha' BuildSucceeded ]
944
+ void $ runLoop state' [Logic. BuildStatusChanged [ Branch " integration/6 " ] rebasedSha' BuildSucceeded ]
945
945
946
946
-- After the second build success, the pull request should have been
947
947
-- integrated properly, version should be incremented only once
@@ -1009,11 +1009,11 @@ eventLoopSpec = parallel $ do
1009
1009
git [" push" , " origin" , refSpec (Git. TagName " v2" )]
1010
1010
1011
1011
let [rebasedSha] = integrationShas state
1012
- state' <- runLoop state [Logic. BuildStatusChanged rebasedSha BuildSucceeded ]
1012
+ state' <- runLoop state [Logic. BuildStatusChanged [ Branch " integration/6 " ] rebasedSha BuildSucceeded ]
1013
1013
1014
1014
-- Again notify build success, now for the new commit.
1015
1015
let [rebasedSha'] = integrationShas state'
1016
- void $ runLoop state' [Logic. BuildStatusChanged rebasedSha' BuildSucceeded ]
1016
+ void $ runLoop state' [Logic. BuildStatusChanged [ Branch " integration/6 " ] rebasedSha' BuildSucceeded ]
1017
1017
1018
1018
-- After the second build success, the pull request should have been integrated properly,
1019
1019
-- version should be incremented only once, and follow version that appeared in the meantime
@@ -1078,7 +1078,7 @@ eventLoopSpec = parallel $ do
1078
1078
-- Extract the sha of the rebased commit from the project state, and
1079
1079
-- tell the loop that building the commit succeeded.
1080
1080
let [rebasedSha] = integrationShas state
1081
- void $ runLoop state [Logic. BuildStatusChanged rebasedSha BuildSucceeded ]
1081
+ void $ runLoop state [Logic. BuildStatusChanged [ Branch " integration/8 " ] rebasedSha BuildSucceeded ]
1082
1082
1083
1083
-- We expect the fixup commit (which was last) to be squashed into c7, so
1084
1084
-- now c8 is the last commit, and there are no others. Note that if the
@@ -1118,11 +1118,11 @@ eventLoopSpec = parallel $ do
1118
1118
-- Extract the sha of the rebased commit from the project state, and
1119
1119
-- tell the loop that building the commit succeeded.
1120
1120
let [rebasedSha] = integrationShas state
1121
- state' <- runLoop state [Logic. BuildStatusChanged rebasedSha BuildSucceeded ]
1121
+ state' <- runLoop state [Logic. BuildStatusChanged [ Branch " integration/8 " ] rebasedSha BuildSucceeded ]
1122
1122
1123
1123
-- Again notify build success, now for the new commit.
1124
1124
let [rebasedSha'] = integrationShas state'
1125
- void $ runLoop state' [Logic. BuildStatusChanged rebasedSha' BuildSucceeded ]
1125
+ void $ runLoop state' [Logic. BuildStatusChanged [ Branch " integration/8 " ] rebasedSha' BuildSucceeded ]
1126
1126
1127
1127
-- We expect the fixup commit (which was last) to be squashed into c7, so
1128
1128
-- now c8 is the last commit, and there are no others. This time c4 and c5
@@ -1168,7 +1168,7 @@ eventLoopSpec = parallel $ do
1168
1168
-- tell the loop that building the commit succeeded.
1169
1169
1170
1170
let [rebasedSha] = integrationShas state
1171
- state' <- runLoop state [Logic. BuildStatusChanged rebasedSha BuildSucceeded ]
1171
+ state' <- runLoop state [Logic. BuildStatusChanged [ Branch " integration/8 " ] rebasedSha BuildSucceeded ]
1172
1172
1173
1173
-- The pull request should not be integrated. Moreover, the presence of
1174
1174
-- orphan fixups should make the PR ineligible for being a candidate for integration.
@@ -1210,7 +1210,7 @@ eventLoopSpec = parallel $ do
1210
1210
1211
1211
state' <- runLoop state
1212
1212
[
1213
- Logic. BuildStatusChanged rebasedSha BuildSucceeded ,
1213
+ Logic. BuildStatusChanged [ Branch " integration/8 " ] rebasedSha BuildSucceeded ,
1214
1214
Logic. CommentAdded pr6 " rachael" " @bot merge"
1215
1215
]
1216
1216
0 commit comments