@@ -131,8 +131,12 @@ public function testChangelogFormat(string $changelogPath)
131131 }
132132
133133 #[DataProvider('provideChangedServicesWithoutChangelog ' )]
134- public function testChangelogEntryForService (string $ service , string $ base , $ isCommentOnly )
134+ public function testChangelogEntryForService (string $ service , string $ base , bool $ isCommentOnly )
135135 {
136+ if ('' === $ service ) {
137+ self ::markTestSkipped ('Nothing to test ' );
138+ }
139+
136140 if (!$ isCommentOnly ) {
137141 self ::fail ('Missing CHANGELOG entry for package ' . $ service );
138142 }
@@ -186,7 +190,7 @@ static function ($branch) {
186190 );
187191
188192 if (0 === \count ($ branches )) {
189- self :: markTestSkipped ( ' Cannot find the master branch ' ) ;
193+ yield [ null , null , null ] ;
190194 }
191195
192196 usort ($ branches , static function ($ a , $ b ) {
@@ -242,6 +246,7 @@ static function ($branch) {
242246 $ changedServices [$ service ]['files ' ][] = $ subPath ;
243247 }
244248
249+ $ oneChange = false ;
245250 foreach ($ changedServices as $ service => $ changesService ) {
246251 $ changedFiles = $ changesService ['files ' ];
247252 if (\in_array ('/CHANGELOG.md ' , $ changedFiles , true )) {
@@ -271,6 +276,10 @@ static function ($branch) {
271276 }
272277
273278 yield [$ service , $ changesService ['base ' ], $ isCommentOnly ];
279+ $ oneChange = true ;
280+ }
281+ if (!$ oneChange ) {
282+ yield ['' , '' , false ];
274283 }
275284 }
276285
0 commit comments