Skip to content

Commit ad1bf5d

Browse files
committed
refactor: omit scoreTarget when undefined
1 parent 94cbbff commit ad1bf5d

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

packages/ci/src/lib/portal/__snapshots__/transform.unit.test.ts.snap

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ exports[`transformGQLReport > should convert full GraphQL report to valid report
1212
"weight": 1,
1313
},
1414
],
15-
"scoreTarget": undefined,
1615
"slug": "code-style",
1716
"title": "Code style",
1817
},
@@ -25,7 +24,6 @@ exports[`transformGQLReport > should convert full GraphQL report to valid report
2524
"weight": 1,
2625
},
2726
],
28-
"scoreTarget": undefined,
2927
"slug": "bundle-size",
3028
"title": "Bundle size",
3129
},

packages/ci/src/lib/portal/transform.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ function transformGQLCategory(category: CategoryFragment): CategoryConfig {
7272
),
7373
// TODO: Portal API migration - convert isBinary to scoreTarget for backward compatibility
7474
// Remove this conversion when Portal API supports scoreTarget (#713)
75-
scoreTarget: category.isBinary ? 1 : undefined,
75+
...(category.isBinary && { scoreTarget: 1 }),
7676
};
7777
}
7878

0 commit comments

Comments
 (0)