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:
+5
-5
@@ -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
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -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),
|
||||||
|
|||||||
Reference in New Issue
Block a user