- introduce capability for custom placeholders also to the global template

- introduce new convenient functions to handle this
This commit is contained in:
Mike Penz
2022-07-29 14:54:45 +00:00
committed by GitHub
parent 15a108d43e
commit 7b1021454a
7 changed files with 159 additions and 110 deletions
+2 -2
View File
@@ -3,7 +3,7 @@ import {Commits, filterCommits, DiffInfo, DefaultDiffInfo} from './commits'
import {Configuration, DefaultConfiguration} from './configuration'
import {PullRequestInfo, PullRequests} from './pullRequests'
import {Octokit} from '@octokit/rest'
import {buildChangelog, fillAdditionalPlaceholders} from './transform'
import {buildChangelog, replaceEmptyTemplate} from './transform'
import {failOrError} from './utils'
import {TagInfo} from './tags'
@@ -61,7 +61,7 @@ export class ReleaseNotes {
if (mergedPullRequests.length === 0) {
core.warning(`⚠️ No pull requests found`)
return fillAdditionalPlaceholders(
return replaceEmptyTemplate(
this.options.configuration.empty_template || DefaultConfiguration.empty_template,
this.options
)