- adjust things to have fallback to empty string as octocit changed nullability

- recompile dist
This commit is contained in:
Mike Penz
2020-12-02 09:26:33 +01:00
parent 8f70d43d08
commit 764738b7fa
6 changed files with 10652 additions and 227 deletions
+11 -8
View File
@@ -56,14 +56,17 @@ export class Commits {
core.info(
`️ Found ${commits.length} commits from the GitHub API for ${owner}/${repo}`
)
return commits.map(commit => ({
sha: commit.sha,
summary: commit.commit.message.split('\n')[0],
message: commit.commit.message,
date: moment(commit.commit.committer.date),
author: commit.commit.author.name,
prNumber: undefined
}))
return commits
.filter(commit => commit.sha)
.map(commit => ({
sha: commit.sha || '',
summary: commit.commit.message.split('\n')[0],
message: commit.commit.message,
date: moment(commit.commit.committer?.date),
author: commit.commit.author?.name || '',
prNumber: undefined
}))
}
private sortCommits(commits: CommitInfo[]): CommitInfo[] {