- introduce new placeholder for AUTHOR_NAME

- FIX https://github.com/mikepenz/release-changelog-builder-action/issues/1360
This commit is contained in:
Mike Penz
2024-08-07 14:54:02 +02:00
parent f968a8466a
commit f43925498a
8 changed files with 134 additions and 122 deletions
+3
View File
@@ -73,6 +73,7 @@ export class GiteaRepository extends BaseRepository {
mergedAt: pr.merged_at ? moment(pr.merged_at) : undefined,
mergeCommitSha: pr.merge_commit_sha || '',
author: pr.user?.login || '',
authorName: pr.user?.full_name || '',
repoName: pr.base?.repo?.full_name || '',
labels: pr.labels?.map(label => label.name?.toLowerCase()) as string[],
milestone: pr.milestone?.title || '',
@@ -134,8 +135,10 @@ export class GiteaRepository extends BaseRepository {
summary: subject,
message: '', // This would require another git command to get the full message if needed
author: authorName,
authorName,
authorDate: moment(authorDate, 'ddd MMM DD HH:mm:ss YYYY ZZ', false),
committer: committerName,
committerName,
commitDate: moment(committerDate, 'ddd MMM DD HH:mm:ss YYYY ZZ', false),
prNumber: undefined // This is not available directly from git, would require additional logic to associate commits with PRs
}
+3
View File
@@ -60,8 +60,10 @@ export class GithubRepository extends BaseRepository {
summary: commit.commit.message.split('\n')[0],
message: commit.commit.message,
author: commit.author?.login || commit.commit.author?.name || '',
authorName: commit.commit.author?.name || '',
authorDate: moment(commit.commit.author?.date),
committer: commit.committer?.login || '',
committerName: commit.committer?.name || '',
commitDate: moment(commit.commit.committer?.date),
prNumber: undefined
}))
@@ -269,6 +271,7 @@ export class GithubRepository extends BaseRepository {
mergedAt: pr.merged_at ? moment(pr.merged_at) : undefined,
mergeCommitSha: pr.merge_commit_sha || '',
author: pr.user?.login || '',
authorName: pr.user?.name || '',
repoName: pr.base.repo.full_name,
labels: this.attachSpecialLabels(status, pr.labels?.map(lbl => lbl.name?.toLocaleLowerCase('en') || '') || []),
milestone: pr.milestone?.title || '',