Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AAE-19365] Fix for changelog generation #9226

Merged
merged 1 commit into from
Jan 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion lib/cli/scripts/changelog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import { argv, exit } from 'node:process';
import * as shell from 'shelljs';
import * as path from 'path';
import program from 'commander';
import { logger } from './logger';
import * as fs from 'fs';
import * as ejs from 'ejs';

Expand Down Expand Up @@ -116,7 +117,15 @@ function getCommits(options: DiffOptions): Array<Commit> {

return log
.split('\\n')
.map((str: string) => JSON.parse(str) as Commit)
.map((str: string) => {
try {
return JSON.parse(str) as Commit;
} catch (error) {
logger.error(`Unparsable commit message: ${str}, dropping it... Please apply manual fix.`);
return null;
}
})
.filter((commit) => commit !== null)
.filter((commit: Commit) => commitAuthorAllowed(commit, authorFilter));
}

Expand Down