diff --git a/src/release-pr.ts b/src/release-pr.ts index 10780fbe8..db077a729 100644 --- a/src/release-pr.ts +++ b/src/release-pr.ts @@ -55,6 +55,7 @@ export interface BuildOptions { export interface ReleasePROptions extends BuildOptions { releaseType: string; + changelogSections?: []; } export interface ReleaseCandidate { @@ -96,6 +97,7 @@ export class ReleasePR { proxyKey?: string; snapshot?: boolean; lastPackageVersion?: string; + changelogSections?: []; constructor(options: ReleasePROptions) { this.bumpMinorPreMajor = options.bumpMinorPreMajor || false; @@ -118,6 +120,8 @@ export class ReleasePR { : undefined; this.gh = this.gitHubInstance(options.octokitAPIs); + + this.changelogSections = options.changelogSections; } async run() { diff --git a/src/releasers/node.ts b/src/releasers/node.ts index 476dd739d..2c0537fe6 100644 --- a/src/releasers/node.ts +++ b/src/releasers/node.ts @@ -41,6 +41,7 @@ export class Node extends ReleasePR { commits, githubRepoUrl: this.repoUrl, bumpMinorPreMajor: this.bumpMinorPreMajor, + changelogSections: this.changelogSections, }); const candidate: ReleaseCandidate = await this.coerceReleaseCandidate( cc, diff --git a/src/releasers/python.ts b/src/releasers/python.ts index d8c8976b3..3e9a2512f 100644 --- a/src/releasers/python.ts +++ b/src/releasers/python.ts @@ -56,7 +56,7 @@ export class Python extends ReleasePR { commits, githubRepoUrl: this.repoUrl, bumpMinorPreMajor: this.bumpMinorPreMajor, - changelogSections: CHANGELOG_SECTIONS, + changelogSections: this.changelogSections || CHANGELOG_SECTIONS, }); const candidate: ReleaseCandidate = await this.coerceReleaseCandidate( cc, diff --git a/src/releasers/ruby.ts b/src/releasers/ruby.ts index 7efb74c61..64d92c5af 100644 --- a/src/releasers/ruby.ts +++ b/src/releasers/ruby.ts @@ -52,6 +52,7 @@ export class Ruby extends ReleasePR { commits: postProcessCommits(commits), githubRepoUrl: this.repoUrl, bumpMinorPreMajor: this.bumpMinorPreMajor, + changelogSections: this.changelogSections, }); const candidate: ReleaseCandidate = await this.coerceReleaseCandidate( cc, diff --git a/src/releasers/simple.ts b/src/releasers/simple.ts index 4b9544c91..8c9c9bcb9 100644 --- a/src/releasers/simple.ts +++ b/src/releasers/simple.ts @@ -40,6 +40,7 @@ export class Simple extends ReleasePR { commits, githubRepoUrl: this.repoUrl, bumpMinorPreMajor: this.bumpMinorPreMajor, + changelogSections: this.changelogSections, }); const candidate: ReleaseCandidate = await this.coerceReleaseCandidate( cc, diff --git a/src/releasers/terraform-module.ts b/src/releasers/terraform-module.ts index 14581a9e8..942026e74 100644 --- a/src/releasers/terraform-module.ts +++ b/src/releasers/terraform-module.ts @@ -40,6 +40,7 @@ export class TerraformModule extends ReleasePR { commits, githubRepoUrl: this.repoUrl, bumpMinorPreMajor: this.bumpMinorPreMajor, + changelogSections: this.changelogSections, }); const candidate: ReleaseCandidate = await this.coerceReleaseCandidate( cc,