- add new configuration to enable exportCache (disabled by default)
- this changes behavior since `rc04`
This commit is contained in:
@@ -55,6 +55,7 @@ async function run(): Promise<void> {
|
||||
const fetchReleaseInformation = core.getInput('fetchReleaseInformation') === 'true'
|
||||
const fetchReviews = core.getInput('fetchReviews') === 'true'
|
||||
const commitMode = core.getInput('commitMode') === 'true'
|
||||
const exportCache = core.getInput('exportCache') === 'true'
|
||||
const exportOnly = core.getInput('exportOnly') === 'true'
|
||||
|
||||
const result = await new ReleaseNotesBuilder(
|
||||
@@ -73,6 +74,7 @@ async function run(): Promise<void> {
|
||||
fetchReleaseInformation,
|
||||
fetchReviews,
|
||||
commitMode,
|
||||
exportCache,
|
||||
exportOnly,
|
||||
configuration
|
||||
).build()
|
||||
|
||||
+14
-11
@@ -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)
|
||||
|
||||
+1
-1
@@ -251,7 +251,7 @@ export function buildChangelog(diffInfo: DiffInfo, origPrs: PullRequestInfo[], o
|
||||
}
|
||||
}
|
||||
|
||||
// note the `exclude label` configuration of categories will not apply to the legacy "UNCATEGORIZED" placeholder
|
||||
// note the `exclude label` configuration of categories will not apply to the legacy "UNCATEGORIZED" placeholder
|
||||
uncategorizedPrs.push(body)
|
||||
} else {
|
||||
categorizedPrs.push(body)
|
||||
|
||||
Reference in New Issue
Block a user