Skip to content

Commit

Permalink
Merge pull request #182 from deriv-com/update-custom-transform
Browse files Browse the repository at this point in the history
chore: skip bad commits
  • Loading branch information
prince-deriv authored Jan 14, 2025
2 parents 7237ee7 + 40c84ee commit 485742c
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions release.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,18 @@ module.exports = {
mergeCorrespondence: ['id', 'source'],
},
writerOpts: {
transform: transform,
// Adding a fallback for Date handling to avoid the TypeError
processCommitDate: (commit) => {
if (commit.date && !(commit.date instanceof Date)) {
// If the commit date is not a valid Date, set it to a fallback Date
commit.date = new Date(commit.date);
transform: (commit) => {
try {
return commit;
} catch (error) {
// Log the error and continue processing the next commit
console.error(`Error processing commit: ${commit.message}`, error);
return null; // This will skip the problematic commit
}
return commit;
},
},
},
],

'@semantic-release/changelog',
[
'@semantic-release/npm',
Expand Down

0 comments on commit 485742c

Please sign in to comment.