- add new configuration to enable exportCache (disabled by default)

- this changes behavior since `rc04`
This commit is contained in:
Mike Penz
2023-07-28 11:24:47 +00:00
committed by GitHub
parent 5c949cd54d
commit f0cbee5a3a
9 changed files with 62 additions and 33 deletions
+14 -11
View File
@@ -45,6 +45,7 @@ export class ReleaseNotesBuilder {
private fetchReleaseInformation: boolean = false,
private fetchReviews: boolean = false,
private commitMode: boolean = false,
private exportCache: boolean = false,
private exportOnly: boolean = false,
private configuration: Configuration
) {}
@@ -107,18 +108,20 @@ export class ReleaseNotesBuilder {
const diffInfo = prData.diffInfo
this.setOutputs(options, diffInfo, mergedPullRequests)
const cache = {
mergedPullRequests,
diffInfo,
options
}
core.setOutput(`cache`, JSON.stringify(cache))
//fs.writeFileSync(path.resolve('cache.json'), JSON.stringify(cache))
if (this.exportCache) {
const cache = {
mergedPullRequests,
diffInfo,
options
}
core.setOutput(`cache`, JSON.stringify(cache))
//fs.writeFileSync(path.resolve('cache.json'), JSON.stringify(cache))
if (this.exportOnly) {
core.info(`️ Enabled 'exportOnly' will not generate changelog`)
core.endGroup()
return null
if (this.exportOnly) {
core.info(`️ Enabled 'exportOnly' will not generate changelog`)
core.endGroup()
return null
}
}
return buildChangelog(diffInfo, mergedPullRequests, options)