@@ -283,6 +283,23 @@ describe('workers/repository/dependency-dashboard', () => {
283283 dependencyDashboardRebaseAllOpen : false ,
284284 } ) ;
285285 } ) ;
286+
287+ it ( 'reads dashboard body and group size not met branches' , async ( ) => {
288+ const conf : RenovateConfig = { } ;
289+ conf . prCreation = 'approval' ;
290+ platform . findIssue . mockResolvedValueOnce ( {
291+ title : '' ,
292+ number : 1 ,
293+ body : `
294+ - [x] <!-- approveGroup-branch=groupedBranch1 -->
295+ - [ ] <!-- approveGroup-branch=groupedBranch2 -->
296+ ` ,
297+ } ) ;
298+ await dependencyDashboard . readDashboardBody ( conf ) ;
299+ expect ( conf . dependencyDashboardChecks ) . toMatchObject ( {
300+ groupedBranch1 : 'approveGroup' ,
301+ } ) ;
302+ } ) ;
286303 } ) ;
287304
288305 describe ( 'ensureDependencyDashboard()' , ( ) => {
@@ -685,6 +702,47 @@ describe('workers/repository/dependency-dashboard', () => {
685702 await dryRun ( branches , platform , 0 , 1 ) ;
686703 } ) ;
687704
705+ it ( 'checks an issue with group size not met branches' , async ( ) => {
706+ const branches : BranchConfig [ ] = [
707+ {
708+ ...mock < BranchConfig > ( ) ,
709+ upgrades : [ { ...mock < PrUpgrade > ( ) , depName : 'dep1' } ] ,
710+ result : 'minimum-group-size-not-met' ,
711+ branchName : 'groupBranch1' ,
712+ } ,
713+ ] ;
714+ config . dependencyDashboard = true ;
715+ await dependencyDashboard . ensureDependencyDashboard (
716+ config ,
717+ branches ,
718+ { } ,
719+ { result : 'no-migration' } ,
720+ ) ;
721+ expect ( platform . ensureIssueClosing ) . toHaveBeenCalledTimes ( 0 ) ;
722+ expect ( platform . ensureIssue ) . toHaveBeenCalledTimes ( 1 ) ;
723+ expect ( platform . ensureIssue . mock . calls [ 0 ] [ 0 ] . title ) . toBe (
724+ config . dependencyDashboardTitle ,
725+ ) ;
726+ expect ( platform . ensureIssue . mock . calls [ 0 ] [ 0 ] . body . trim ( ) ) . toBe (
727+ codeBlock `
728+ This issue lists Renovate updates and detected dependencies. Read the [Dependency Dashboard](https://docs.renovatebot.com/key-concepts/dashboard/) docs to learn more.
729+
730+ ## Group Size Not Met
731+
732+ The following branches have not met their minimum group size. To create them, click on a checkbox below.
733+
734+ - [ ] <!-- approveGroup-branch=groupBranch1 -->undefined
735+
736+ ## Detected dependencies
737+
738+ None detected
739+ ` ,
740+ ) ;
741+
742+ // same with dry run
743+ await dryRun ( branches , platform , 0 , 1 ) ;
744+ } ) ;
745+
688746 it ( 'checks an issue with 3 PR in approval' , async ( ) => {
689747 const branches : BranchConfig [ ] = [
690748 {
0 commit comments