Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: pass an array of change log section options to the node releaser #538

Merged
merged 2 commits into from
Sep 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/release-pr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export interface BuildOptions {

export interface ReleasePROptions extends BuildOptions {
releaseType: string;
changelogSections?: [];
}

export interface ReleaseCandidate {
Expand Down Expand Up @@ -96,6 +97,7 @@ export class ReleasePR {
proxyKey?: string;
snapshot?: boolean;
lastPackageVersion?: string;
changelogSections?: [];

constructor(options: ReleasePROptions) {
this.bumpMinorPreMajor = options.bumpMinorPreMajor || false;
Expand All @@ -118,6 +120,8 @@ export class ReleasePR {
: undefined;

this.gh = this.gitHubInstance(options.octokitAPIs);

this.changelogSections = options.changelogSections;
}

async run() {
Expand Down
1 change: 1 addition & 0 deletions src/releasers/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/releasers/python.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions src/releasers/ruby.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions src/releasers/simple.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions src/releasers/terraform-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down