@@ -60,15 +60,34 @@ export default (props: Props) => {
60
60
}
61
61
}
62
62
} ;
63
+ // TODO: Make the graph update without changing the graph
64
+ // TODO: Merge authors
65
+ // TODO: Branches and files
66
+ // TODO: Delete commits
63
67
64
68
let preparedCommits : Commit [ ] = [ ] ;
65
69
if ( ! props . commits || props . commits . length === 0 ) {
66
70
preparedCommits = [ ] ;
67
71
} else {
68
72
// Sort commits
69
73
preparedCommits = props . commits . sort ( ( a , b ) => new Date ( a . date ) - new Date ( b . date ) ) ;
74
+ let tempCommits : Commit [ ] = [ ] ;
75
+ // Filter out commits based on unselected authors
76
+ // TODO: Assert commiters and selected authors are arrays
77
+ const excludedAuthors = props . committers . filter ( ( s ) => ! props . selectedAuthors . includes ( s ) ) ;
78
+ console . log ( 'Excluded authors' , excludedAuthors ) ;
79
+ for ( const commit of preparedCommits ) {
80
+ if ( ! excludedAuthors . includes ( commit . signature ) ) {
81
+ tempCommits . push ( commit ) ;
82
+ }
83
+ }
84
+ preparedCommits = tempCommits ;
85
+ tempCommits = [ ] ;
86
+
87
+ // Filter out commits not in the selected branch
88
+
89
+
70
90
// Filter based on rules in regexConfig
71
- const tempCommits : Commit [ ] = [ ] ;
72
91
const regexCommitMessage = new RegExp ( '\\b' + props . regexConfig . commitMessage + '\\b' , 'i' ) ;
73
92
const regexIssueTitle = new RegExp ( '\\b' + props . regexConfig . issueTitle + '\\b' , 'i' ) ;
74
93
const regexIssueLabel = new RegExp ( '\\b' + props . regexConfig . issueLabelName + '\\b' , 'i' ) ;
0 commit comments