- introduce new placeholder for AUTHOR_NAME
- FIX https://github.com/mikepenz/release-changelog-builder-action/issues/1360
This commit is contained in:
@@ -28,8 +28,10 @@ export interface CommitInfo {
|
||||
summary: string
|
||||
message: string
|
||||
author: string
|
||||
authorName: string
|
||||
authorDate: moment.Moment
|
||||
committer: string
|
||||
committerName: string
|
||||
commitDate: moment.Moment
|
||||
}
|
||||
|
||||
@@ -117,6 +119,7 @@ export function convertCommitsToPrs(options: Options, diffInfo: DiffInfo): [Diff
|
||||
mergedAt: commit.commitDate,
|
||||
mergeCommitSha: commit.sha,
|
||||
author: commit.author || '',
|
||||
authorName: commit.authorName || '',
|
||||
repoName: '',
|
||||
labels: [],
|
||||
milestone: '',
|
||||
|
||||
@@ -16,6 +16,7 @@ export interface PullRequestInfo {
|
||||
mergedAt: moment.Moment | undefined
|
||||
mergeCommitSha: string
|
||||
author: string
|
||||
authorName: string
|
||||
repoName: string
|
||||
labels: string[]
|
||||
milestone: string
|
||||
@@ -45,6 +46,7 @@ export const EMPTY_PULL_REQUEST_INFO: PullRequestInfo = {
|
||||
createdAt: moment(),
|
||||
mergeCommitSha: '',
|
||||
author: '',
|
||||
authorName: '',
|
||||
repoName: '',
|
||||
labels: [],
|
||||
milestone: '',
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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 || '',
|
||||
|
||||
@@ -472,6 +472,7 @@ function fillPrTemplate(
|
||||
placeholderMap.set('MERGED_AT', pr.mergedAt?.toISOString() || '')
|
||||
placeholderMap.set('MERGE_SHA', pr.mergeCommitSha)
|
||||
placeholderMap.set('AUTHOR', pr.author)
|
||||
placeholderMap.set('AUTHOR_NAME', pr.authorName)
|
||||
placeholderMap.set('LABELS', [...pr.labels]?.filter(l => !l.startsWith('--rcba-'))?.join(', ') || '')
|
||||
placeholderMap.set('MILESTONE', pr.milestone || '')
|
||||
placeholderMap.set('BODY', pr.body)
|
||||
|
||||
Reference in New Issue
Block a user