Skip to content

Commit

Permalink
feat: Implement noDiffForStages input (#108)
Browse files Browse the repository at this point in the history
implements the noDiffForStages input filtering out the matched stages

closes #93
  • Loading branch information
Guslington authored Jan 11, 2025
1 parent aef7363 commit 85c00ca
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
7 changes: 5 additions & 2 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion src/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,16 @@ export async function run() {
const context = github.context;
try {
const assembly = AssemblyManifestReader.fromPath(inputs.cdkOutDir);
const stages = assembly.stages;
var stages = assembly.stages;
if (assembly.stacks.length) {
stages.push({
name: 'DefaultStage',
stacks: assembly.stacks,
});
}
if (inputs.noDiffForStages.length) {
stages = stages.filter( stage => !inputs.noDiffForStages.includes(stage.name) );
}
const comments = new Comments(octokit, context);
const processor = new StageProcessor(stages, inputs.allowedDestroyTypes);
try {
Expand Down

0 comments on commit 85c00ca

Please sign in to comment.