File tree Expand file tree Collapse file tree 2 files changed +25
-21
lines changed
Expand file tree Collapse file tree 2 files changed +25
-21
lines changed Original file line number Diff line number Diff line change @@ -90,7 +90,9 @@ export async function runPrettier({
9090 `--src-prefix=Original|${ fileLinkPrefix } ` ,
9191 `--dst-prefix=Alternative|...` ,
9292 ] ,
93- { cwd : directory } ,
93+ {
94+ cwd : directory ,
95+ } ,
9496 ) ;
9597
9698 return stdout ;
Original file line number Diff line number Diff line change @@ -58,26 +58,28 @@ export function getReport({
5858 ( resultA , resultB ) => resultB . diff . length - resultA . diff . length ,
5959 ) ;
6060
61- const formattedResults = result . map ( ( { repository, diff : rawDiff } ) => {
62- const shortHash = repository . commit . slice ( 0 , 7 ) ;
63- const head = `[${ repository . repository } @${ shortHash } ](https://github.com/${ repository . repository } /tree/${ repository . commit } )` ;
64- const diff = formatDiff ( rawDiff ) ;
65- const length =
66- title . length +
67- head . length +
68- diff . length +
69- /* Some room for blank lines */ 50 ;
70- const shouldUpload = length > MAXIMUM_GITHUB_COMMENT_LENGTH ;
71- return {
72- head,
73- diff,
74- shouldUpload,
75- length : shouldUpload
76- ? // Save some space for uploaded url
77- 200
78- : length ,
79- } ;
80- } ) ;
61+ const formattedResults = result . map (
62+ ( { repository, diff : rawDiff } , index ) => {
63+ const shortHash = repository . commit . slice ( 0 , 7 ) ;
64+ const head = `[${ index + 1 } /${ result . length } ] [${ repository . repository } @${ shortHash } ](https://github.com/${ repository . repository } /tree/${ repository . commit } )` ;
65+ const diff = formatDiff ( rawDiff ) ;
66+ const length =
67+ title . length +
68+ head . length +
69+ diff . length +
70+ /* Some room for blank lines */ 50 ;
71+ const shouldUpload = length > MAXIMUM_GITHUB_COMMENT_LENGTH ;
72+ return {
73+ head,
74+ diff,
75+ shouldUpload,
76+ length : shouldUpload
77+ ? // Save some space for uploaded url
78+ 200
79+ : length ,
80+ } ;
81+ } ,
82+ ) ;
8183
8284 const group : { length : number ; results : typeof formattedResults } [ ] = [ ] ;
8385 for ( const formattedResult of formattedResults ) {
You can’t perform that action at this time.
0 commit comments