- introduce additional placeholders supported by the template

- introduce placeholder support into `empty_template`
- introduce new placeholders for templates, update README with new placeholders
This commit is contained in:
Mike Penz
2020-10-19 17:53:39 +02:00
parent 470822c9f8
commit c6ed215bc2
4 changed files with 71 additions and 26 deletions
+9 -4
View File
@@ -6,6 +6,7 @@ import {failOrError} from './utils'
import {Octokit} from '@octokit/rest'
import {Tags} from './tags'
import {ReleaseNotes} from './releaseNotes'
import {fillAdditionalPlaceholders} from './transform'
export class ReleaseNotesBuilder {
constructor(
@@ -96,19 +97,23 @@ export class ReleaseNotesBuilder {
core.endGroup()
}
const releaseNotes = new ReleaseNotes(octokit, {
const options = {
owner: this.owner,
repo: this.repo,
fromTag: this.fromTag,
toTag: this.toTag,
failOnError: this.failOnError,
configuration: this.configuration
})
}
const releaseNotes = new ReleaseNotes(octokit, options)
return (
(await releaseNotes.pull()) ||
this.configuration.empty_template ||
DefaultConfiguration.empty_template
fillAdditionalPlaceholders(
this.configuration.empty_template ||
DefaultConfiguration.empty_template,
options
)
)
}
}