Merge pull request #1328 from mikepenz/fix/1327

Fallback to alternative author value if main commit author login is not available
This commit is contained in:
Mike Penz
2024-04-10 13:58:58 +02:00
committed by GitHub
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
.filter(commit => commit.sha)
.map(commit => {
var _a, _b, _c, _d;
var _a, _b, _c, _d, _e;
return ({
sha: commit.sha || '',
summary: commit.commit.message.split('\n')[0],
message: commit.commit.message,
author: ((_a = commit.author) === null || _a === void 0 ? void 0 : _a.login) || '',
authorDate: (0, moment_1.default)((_b = commit.commit.author) === null || _b === void 0 ? void 0 : _b.date),
committer: ((_c = commit.committer) === null || _c === void 0 ? void 0 : _c.login) || '',
commitDate: (0, moment_1.default)((_d = commit.commit.committer) === null || _d === void 0 ? void 0 : _d.date),
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)((_c = commit.commit.author) === null || _c === void 0 ? void 0 : _c.date),
committer: ((_d = commit.committer) === null || _d === void 0 ? void 0 : _d.login) || '',
commitDate: (0, moment_1.default)((_e = commit.commit.committer) === null || _e === void 0 ? void 0 : _e.date),
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 || '',
summary: commit.commit.message.split('\n')[0],
message: commit.commit.message,
author: commit.author?.login || '',
author: commit.author?.login || commit.commit.author?.name || '',
authorDate: moment(commit.commit.author?.date),
committer: commit.committer?.login || '',
commitDate: moment(commit.commit.committer?.date),