@@ -8,21 +8,21 @@ function getNotes() {
8
8
const result = cleanedNotes . match ( regex ) ; // extract the commit data as an array
9
9
cleanedNotes = '' ;
10
10
result . forEach ( item => {
11
- item = item . replace ( / \( \[ ( [ a - f 0 - 9 ] { 7 } ) \] \( .* ?\) \) / , '' ) ; // remove the parentheses and the commit hash
12
- item = item . trim ( ) ; // remove any extra spaces
13
- cleanedNotes += item + '\n\n' ; // add the formatted item to the output string with a line break
11
+ item = item . replace ( / \( \[ ( [ a - f 0 - 9 ] { 7 } ) \] \( .* ?\) \) / , '' ) ; // remove the parentheses and the commit hash
12
+ item = item . trim ( ) ; // remove any extra spaces
13
+ cleanedNotes += item + '\n\n' ; // add the formatted item to the output string with a line break
14
14
} ) ;
15
15
16
16
// Return the cleaned release notes.
17
17
return `Changelog:\n\n${ cleanedNotes } ` ;
18
18
}
19
19
20
20
function getReleaseDate ( ) {
21
- let cleanedNotes = decodeURIComponent ( arg . notes ) ;
22
- const regex = / \( \d { 4 } - \d { 2 } - \d { 2 } \) / ; // match the date in parentheses
23
- const result = cleanedNotes . match ( regex ) ; // extract the date as a string
24
- cleanedNotes = result [ 0 ] . replace ( / \( | \) / g , '' ) ; // remove the parentheses
25
- return cleanedNotes ; // return the date
21
+ const cleanedNotes = decodeURIComponent ( arg . notes ) ;
22
+ const regex = / \( \d { 4 } - \d { 2 } - \d { 2 } \) / ; // Match the date in parentheses
23
+ const result = cleanedNotes . match ( regex ) ; // Extract the date as a string
24
+
25
+ return result ?. length ? `( ${ result [ 0 ] . replace ( / \( | \) / g , '' ) } )` : "" ; // Remove the parentheses and return the date
26
26
}
27
27
28
28
function getArguments ( repoUrl ) {
0 commit comments