File tree 2 files changed +8
-9
lines changed
2 files changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ export class GitRepository {
33
33
) ;
34
34
35
35
timeLog ( "getListOfCommitsWithChangedFiles" ) ;
36
- return results ;
36
+ return results . filter ( ( x ) => x !== null ) ;
37
37
}
38
38
private async getFilesDiffWithCursor (
39
39
options : GitReadOptions = { } ,
Original file line number Diff line number Diff line change @@ -43,14 +43,12 @@ export function clearScreen() {
43
43
44
44
async function collectHotFiles ( commitsWithChangedFiles : ExpandedCommit [ ] ) {
45
45
const commitsPerFile = getNumberOfChangesPerFile ( commitsWithChangedFiles ) ;
46
- log (
47
- "hot files (files with most changes)" ,
48
- Object . keys ( commitsPerFile )
49
- . map ( ( x ) => {
50
- return [ x , commitsPerFile [ x ] ] ;
51
- } )
52
- . sort ( ( a , b ) => Number ( b [ 1 ] ) - Number ( a [ 1 ] ) )
53
- ) ;
46
+ const data = Object . keys ( commitsPerFile ) . map ( ( x ) => {
47
+ return [ x , commitsPerFile [ x ] ] ;
48
+ } ) ;
49
+ data . sort ( ( a , b ) => Number ( b [ 1 ] ) - Number ( a [ 1 ] ) ) ;
50
+ const hotFiles = data . slice ( 0 , 50 ) ;
51
+ log ( "hot files (files with most changes)" , hotFiles ) ;
54
52
}
55
53
async function collectKnowledgeGaps ( commitsWithChangedFiles : ExpandedCommit [ ] ) {
56
54
const contributorsPerFile = getNumberOfContributorsPerFile (
@@ -63,6 +61,7 @@ async function collectKnowledgeGaps(commitsWithChangedFiles: ExpandedCommit[]) {
63
61
return [ x , contributorsPerFile [ x ] ] ;
64
62
} )
65
63
. sort ( ( a , b ) => Number ( a [ 1 ] ) - Number ( b [ 1 ] ) )
64
+ . slice ( 0 , 50 )
66
65
) ;
67
66
}
68
67
function collectDetailedContributorsPerFile (
You can’t perform that action at this time.
0 commit comments