@@ -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
2323const commits :CommitLogObject = { } ;
2424const positions :string [ ] = [ ] ;
@@ -30,31 +30,31 @@ export function parseCommits(logs: ListLogSummary<any>): { [hash: string]: strin
3030
3131if ( 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 ;
3535if ( 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 ] ;
5353positions . unshift ( position ) ;
5454} else {
5555const initMatches = commit . message . match ( / ^ I N I T / ) ;
5656if ( initMatches && initMatches . length ) {
57- commits . INIT = [ ... ( commits . INIT || [ ] ) , commit . hash ]
57+ commits . INIT = [ commit . hash , ... ( commits . INIT || [ ] ) ] ;
5858positions . unshift ( "INIT" ) ;
5959}
6060}