File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed
Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ function start() {
7979 logs . forEach ( ( log ) => allLogs . push ( `${ repoName } |||${ log } ` ) )
8080 } )
8181
82- // Deduplicate
82+ // Deduplicate Logs
8383 const uniqueLogs = [ ...new Set ( allLogs ) ]
8484
8585 // Get target data
@@ -95,7 +95,13 @@ function start() {
9595
9696 // Classify
9797 targetList . forEach ( ( item ) => {
98- const { repo, type } = item
98+ const { repo, type, msg } = item
99+
100+ // Filter duplicate messages
101+ const msgs = result [ repo ] [ type ] . map ( ( i ) => i . msg )
102+ if ( msgs . includes ( msg ) ) return
103+
104+ // Add log record
99105 result [ repo ] [ type ] . push ( item )
100106 } )
101107
Original file line number Diff line number Diff line change @@ -40,19 +40,19 @@ module.exports = function ({ result, isEN }) {
4040 list . forEach ( ( item , index ) => {
4141 const { repo, category, msg } = item
4242
43- // Repo name as h2
43+ // Repo name as `<h2 />`
4444 if ( ! titles . includes ( repo ) ) {
4545 appendFileSync ( reportFile , `## ${ repo } \n\n` )
4646 titles . push ( repo )
4747 }
4848
49- // Category as h3
49+ // Category as `<h3 />`
5050 if ( ! categories . includes ( category ) ) {
5151 appendFileSync ( reportFile , `### ${ category } \n` )
5252 categories . push ( category )
5353 }
5454
55- // Commit message as list item
55+ // Commit message as `<li />`
5656 appendFileSync ( reportFile , `${ index + 1 } . ${ msg } \n` )
5757
5858 if ( index === list . length - 1 ) {
You can’t perform that action at this time.
0 commit comments