- fallback to commit.commit author if commit author does not has a result

- FIX https://github.com/mikepenz/release-changelog-builder-action/issues/1327
This commit is contained in:
Mike Penz
2024-04-10 11:53:49 +00:00
committed by GitHub
parent 94250de014
commit c326a5bb2b
3 changed files with 7 additions and 7 deletions
Generated Vendored
+5 -5
View File
@@ -2213,15 +2213,15 @@ class GithubRepository extends BaseRepository_1.BaseRepository {
commitInfo: commits commitInfo: commits
.filter(commit => commit.sha) .filter(commit => commit.sha)
.map(commit => { .map(commit => {
var _a, _b, _c, _d; var _a, _b, _c, _d, _e;
return ({ return ({
sha: commit.sha || '', sha: commit.sha || '',
summary: commit.commit.message.split('\n')[0], summary: commit.commit.message.split('\n')[0],
message: commit.commit.message, message: commit.commit.message,
author: ((_a = commit.author) === null || _a === void 0 ? void 0 : _a.login) || '', author: ((_a = commit.author) === null || _a === void 0 ? void 0 : _a.login) || ((_b = commit.commit.author) === null || _b === void 0 ? void 0 : _b.name) || '',
authorDate: (0, moment_1.default)((_b = commit.commit.author) === null || _b === void 0 ? void 0 : _b.date), authorDate: (0, moment_1.default)((_c = commit.commit.author) === null || _c === void 0 ? void 0 : _c.date),
committer: ((_c = commit.committer) === null || _c === void 0 ? void 0 : _c.login) || '', committer: ((_d = commit.committer) === null || _d === void 0 ? void 0 : _d.login) || '',
commitDate: (0, moment_1.default)((_d = commit.commit.committer) === null || _d === void 0 ? void 0 : _d.date), commitDate: (0, moment_1.default)((_e = commit.commit.committer) === null || _e === void 0 ? void 0 : _e.date),
prNumber: undefined prNumber: undefined
}); });
}) })
Generated Vendored
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -59,7 +59,7 @@ export class GithubRepository extends BaseRepository {
sha: commit.sha || '', sha: commit.sha || '',
summary: commit.commit.message.split('\n')[0], summary: commit.commit.message.split('\n')[0],
message: commit.commit.message, message: commit.commit.message,
author: commit.author?.login || '', author: commit.author?.login || commit.commit.author?.name || '',
authorDate: moment(commit.commit.author?.date), authorDate: moment(commit.commit.author?.date),
committer: commit.committer?.login || '', committer: commit.committer?.login || '',
commitDate: moment(commit.commit.committer?.date), commitDate: moment(commit.commit.committer?.date),