@@ -16,7 +16,8 @@ export interface updatedDependency extends dependencyAlert {
1616 prevVersion : string ,
1717 newVersion : string ,
1818 compatScore : number ,
19- maintainerChanges : boolean
19+ maintainerChanges : boolean ,
20+ dependencyGroup : string
2021}
2122
2223export interface alertLookup {
@@ -31,6 +32,7 @@ export async function parse (commitMessage: string, body: string, branchName: st
3132 const bumpFragment = commitMessage . match ( / ^ B u m p s .* f r o m (?< from > v ? \d [ ^ ] * ) t o (?< to > v ? \d [ ^ ] * ) \. $ / m)
3233 const updateFragment = commitMessage . match ( / ^ U p d a t e .* r e q u i r e m e n t f r o m \S * ? ? (?< from > v ? \d \S * ) t o \S * ? ? (?< to > v ? \d \S * ) $ / m)
3334 const yamlFragment = commitMessage . match ( / ^ - { 3 } \n (?< dependencies > [ \S | \s ] * ?) \n ^ \. { 3 } \n / m)
35+ const groupName = body . match ( / ^ B u m p s t h e (?< name > \S * ) g r o u p w i t h / m)
3436 const newMaintainer = ! ! body . match ( / M a i n t a i n e r c h a n g e s / m)
3537 const lookupFn = lookup ?? ( ( ) => Promise . resolve ( { alertState : '' , ghsaId : '' , cvss : 0 } ) )
3638 const scoreFn = getScore ?? ( ( ) => Promise . resolve ( 0 ) )
@@ -43,6 +45,7 @@ export async function parse (commitMessage: string, body: string, branchName: st
4345 const chunks = branchName . split ( delim )
4446 const prev = bumpFragment ?. groups ?. from ?? ( updateFragment ?. groups ?. from ?? '' )
4547 const next = bumpFragment ?. groups ?. to ?? ( updateFragment ?. groups ?. to ?? '' )
48+ const dependencyGroup = groupName ?. groups ?. name ?? ''
4649
4750 if ( data [ 'updated-dependencies' ] ) {
4851 return await Promise . all ( data [ 'updated-dependencies' ] . map ( async ( dependency , index ) => {
@@ -61,6 +64,7 @@ export async function parse (commitMessage: string, body: string, branchName: st
6164 newVersion : nextVersion ,
6265 compatScore : await scoreFn ( dependency [ 'dependency-name' ] , lastVersion , nextVersion , chunks [ 1 ] ) ,
6366 maintainerChanges : newMaintainer ,
67+ dependencyGroup : dependencyGroup ,
6468 ...await lookupFn ( dependency [ 'dependency-name' ] , lastVersion , dirname )
6569 }
6670 } ) )
0 commit comments