Skip to content

Commit f9e5f18

Browse files
author
Cliff Odijk
committed
defaultStageDisplayName verwijderd
1 parent 670ace5 commit f9e5f18

8 files changed

Lines changed: 5 additions & 67 deletions

File tree

.projenrc.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,6 @@ const project = new GitHubActionTypeScriptProject({
106106
required: false,
107107
default: 'change-set',
108108
},
109-
defaultStageDisplayName: {
110-
description: 'An optional display name for the CDK default stage.',
111-
required: false,
112-
default: 'DefaultStage',
113-
},
114109
title: {
115110
description: 'An optional title for each diff comment on the PR.',
116111
required: false,

action.yml

Lines changed: 0 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js

Lines changed: 3 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/action.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,6 @@ export async function run() {
9797

9898
const inputs: Inputs = {
9999
title: getInput('title') || undefined,
100-
defaultStageDisplayName: getInput('defaultStageDisplayName', {
101-
required: true,
102-
}),
103100
githubToken: getInput('githubToken'),
104101
stackSelectorPatterns: getMultilineInput('stackSelectorPatterns'),
105102
stackSelectionStrategy: getInput('stackSelectionStrategy', {

src/inputs.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ export interface Inputs {
77
*/
88
githubToken: string;
99

10-
1110
/**
1211
* List of stack selector patterns
1312
*
@@ -48,13 +47,6 @@ export interface Inputs {
4847
*/
4948
baseRef: string;
5049

51-
/**
52-
* An optional display name for the CDK default stage.
53-
*
54-
* @default DefaultStage
55-
*/
56-
defaultStageDisplayName: string;
57-
5850
/**
5951
* An optional title for each diff comment on the PR.
6052
*

src/stage-processor.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ export interface AssemblyProcessorOptions
4848
cdkOutDir: string;
4949
diffMethod: DiffMethod;
5050
toolkit: Toolkit;
51-
defaultStageDisplayName: string;
5251
}
5352

5453
/**
@@ -80,7 +79,7 @@ export class AssemblyProcessor {
8079
this._stageInfo = assembly.stages;
8180
if (assembly.stacks.length) {
8281
this.stageInfo.push({
83-
name: this.options.defaultStageDisplayName,
82+
name: 'DefaultStage',
8483
stacks: assembly.stacks,
8584
});
8685
}

test/stage-processor.test.ts

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ describe('StageProcessor', () => {
111111
node_modules: mock.load(path.join(__dirname, '..', 'node_modules')),
112112
});
113113
const processor = new AssemblyProcessor({
114-
defaultStageDisplayName: 'DefaultStage',
115114
toolkit,
116115
allowedDestroyTypes: [],
117116
cdkOutDir: 'cdk.out',
@@ -149,7 +148,6 @@ describe('StageProcessor', () => {
149148
node_modules: mock.load(path.join(__dirname, '..', 'node_modules')),
150149
});
151150
const processor = new AssemblyProcessor({
152-
defaultStageDisplayName: 'DefaultStage',
153151
toolkit,
154152
allowedDestroyTypes: [],
155153
cdkOutDir: 'cdk.out',
@@ -187,7 +185,6 @@ describe('StageProcessor', () => {
187185
node_modules: mock.load(path.join(__dirname, '..', 'node_modules')),
188186
});
189187
const processor = new AssemblyProcessor({
190-
defaultStageDisplayName: 'DefaultStage',
191188
toolkit,
192189
allowedDestroyTypes: [],
193190
cdkOutDir: 'cdk.out',
@@ -226,7 +223,6 @@ describe('StageProcessor', () => {
226223
node_modules: mock.load(path.join(__dirname, '..', 'node_modules')),
227224
});
228225
const processor = new AssemblyProcessor({
229-
defaultStageDisplayName: 'DefaultStage',
230226
toolkit,
231227
allowedDestroyTypes: [],
232228
cdkOutDir: 'cdk.out',
@@ -261,7 +257,6 @@ describe('StageProcessor', () => {
261257
node_modules: mock.load(path.join(__dirname, '..', 'node_modules')),
262258
});
263259
const processor = new AssemblyProcessor({
264-
defaultStageDisplayName: 'DefaultStage',
265260
toolkit,
266261
allowedDestroyTypes: [],
267262
cdkOutDir: 'cdk.out',
@@ -372,7 +367,6 @@ describe('StageProcessor', () => {
372367
node_modules: mock.load(path.join(__dirname, '..', 'node_modules')),
373368
});
374369
const processor = new AssemblyProcessor({
375-
defaultStageDisplayName: 'DefaultStage',
376370
toolkit,
377371
allowedDestroyTypes: [],
378372
cdkOutDir: 'cdk.out',
@@ -446,7 +440,6 @@ describe('default stage', () => {
446440
node_modules: mock.load(path.join(__dirname, '..', 'node_modules')),
447441
});
448442
const processor = new AssemblyProcessor({
449-
defaultStageDisplayName: 'DefaultStage',
450443
toolkit,
451444
allowedDestroyTypes: [],
452445
cdkOutDir: 'cdk.out',
@@ -467,36 +460,6 @@ describe('default stage', () => {
467460
'No Changes for stack: test-stack :white_check_mark:',
468461
]);
469462
});
470-
471-
test('with custom', async () => {
472-
mock({
473-
'cdk.out': mockOutDir,
474-
node_modules: mock.load(path.join(__dirname, '..', 'node_modules')),
475-
});
476-
const processor = new AssemblyProcessor({
477-
defaultStageDisplayName: 'MyStage',
478-
title: 'Diff for MyStage',
479-
toolkit,
480-
allowedDestroyTypes: [],
481-
cdkOutDir: 'cdk.out',
482-
diffMethod: DiffMethod.LocalFile(
483-
'cdk.out/SomeStage-test-stack.template.json',
484-
),
485-
failOnDestructiveChanges: true,
486-
stackSelectorPatterns: [],
487-
stackSelectionStrategy: 'all-stacks',
488-
noFailOnDestructiveChanges: [],
489-
});
490-
await processor.processStages();
491-
const p = processor.stageComments;
492-
expect(p).toEqual({
493-
MyStage: expect.any(Object),
494-
});
495-
expect(p.MyStage.title).toEqual('Diff for MyStage');
496-
expect(p.MyStage.stackComments['test-stack']).toEqual([
497-
'No Changes for stack: test-stack :white_check_mark:',
498-
]);
499-
});
500463
});
501464

502465
function setupCommentTest(): AssemblyProcessor {
@@ -536,7 +499,6 @@ function setupCommentTest(): AssemblyProcessor {
536499
});
537500
jest.spyOn(Toolkit.prototype, 'diff').mockResolvedValue(templateDiff);
538501
return new AssemblyProcessor({
539-
defaultStageDisplayName: 'DefaultStage',
540502
toolkit,
541503
allowedDestroyTypes: [],
542504
cdkOutDir: 'cdk.out',

0 commit comments

Comments
 (0)