Skip to content

Commit 8a984cb

Browse files
Vikram KaltaVikram Kalta
authored andcommitted
fix: handling ignored content-types
1 parent 766141b commit 8a984cb

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

packages/contentstack-branches/src/interfaces/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export interface BranchDiffRes {
1313
title: string;
1414
type: string;
1515
status: string;
16+
merge_strategy?: string;
1617
}
1718

1819
export interface BranchDiffSummary {

packages/contentstack-branches/src/utils/branch-diff-utility.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,9 @@ function printCompactTextView(branchTextRes: BranchCompactTextRes): void {
196196
if (branchTextRes.modified?.length || branchTextRes.added?.length || branchTextRes.deleted?.length) {
197197
cliux.print(' ');
198198
forEach(branchTextRes.added, (diff: BranchDiffRes) => {
199-
cliux.print(chalk.green(`+ '${diff.title}' ${startCase(camelCase(diff.type))}`));
199+
if (diff.merge_strategy !== 'ignore') {
200+
cliux.print(chalk.green(`+ '${diff.title}' ${startCase(camelCase(diff.type))}`));
201+
}
200202
});
201203

202204
forEach(branchTextRes.modified, (diff: BranchDiffRes) => {

0 commit comments

Comments
 (0)