@@ -16,9 +16,9 @@ type GetCommitOptions = {
1616
1717export type CommitLogObject = { [ position : string ] : string [ ] } ;
1818
19-
20-
21- export function parseCommits ( logs : ListLogSummary < any > ) : { [ hash : string ] : string [ ] } {
19+ export function parseCommits (
20+ logs : ListLogSummary < any >
21+ ) : { [ hash : string ] : string [ ] } {
2222 // Filter relevant logs
2323 const commits : CommitLogObject = { } ;
2424 const positions : string [ ] = [ ] ;
@@ -30,31 +30,31 @@ export function parseCommits(logs: ListLogSummary<any>): { [hash: string]: strin
3030
3131 if ( matches && matches . length ) {
3232 // Use an object of commit arrays to collect all commits
33- const { groups } = matches
34- let position
33+ const { groups } = matches ;
34+ let position ;
3535 if ( groups . init ) {
36- position = ' INIT'
36+ position = " INIT" ;
3737 } else if ( groups . levelId && groups . stepId ) {
38- let stepType
38+ let stepType ;
3939 // @deprecated Q
40- if ( ! groups . stepType || [ 'Q' , 'T' ] . includes ( groups . stepType ) ) {
41- stepType = 'T' // test
40+ if ( ! groups . stepType || [ "Q" , "T" ] . includes ( groups . stepType ) ) {
41+ stepType = "T" ; // test
4242 // @deprecated A
43- } else if ( ! groups . stepType || [ 'A' , 'S' ] . includes ( groups . stepType ) ) {
44- stepType = 'S' // solution
43+ } else if ( ! groups . stepType || [ "A" , "S" ] . includes ( groups . stepType ) ) {
44+ stepType = "S" ; // solution
4545 }
46- position = `${ groups . levelId } .${ groups . stepId } :${ stepType } `
46+ position = `${ groups . levelId } .${ groups . stepId } :${ stepType } ` ;
4747 } else if ( groups . levelId ) {
48- position = groups . levelId
48+ position = groups . levelId ;
4949 } else {
50- console . warn ( `No matcher for commit "${ commit . message } "` )
50+ console . warn ( `No matcher for commit "${ commit . message } "` ) ;
5151 }
52- commits [ position ] = [ ...( commits [ position ] || [ ] ) , commit . hash ]
52+ commits [ position ] = [ ...( commits [ position ] || [ ] ) , commit . hash ] ;
5353 positions . unshift ( position ) ;
5454 } else {
5555 const initMatches = commit . message . match ( / ^ I N I T / ) ;
5656 if ( initMatches && initMatches . length ) {
57- commits . INIT = [ ... ( commits . INIT || [ ] ) , commit . hash ]
57+ commits . INIT = [ commit . hash , ... ( commits . INIT || [ ] ) ] ;
5858 positions . unshift ( "INIT" ) ;
5959 }
6060 }
0 commit comments