Skip to content

Commit 0ff8d64

Browse files
committed
refactor: align previousOperationMetadata
1 parent 70a471f commit 0ff8d64

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/components/compare/compare.operations.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ async function compareCurrentApiType(
232232
diffs: operationDiffs,
233233
changeSummary: changeSummary,
234234
impactedSummary: impactedSummary,
235-
metadata: getOperationMetadata(operation),
235+
[isOperationAdded ? 'metadata' : 'previousMetadata']: getOperationMetadata(operation),
236236
}
237237
validateBwcBreakingChanges(changedOperation)
238238
changedOperations.set(operation.operationId, changedOperation)
@@ -323,10 +323,8 @@ async function compareCurrentApiType(
323323
diffs: operationDiffs,
324324
changeSummary: changeSummary,
325325
impactedSummary: impactedSummary,
326-
metadata: {
327-
...getOperationMetadata(operationsEntry.current),
328-
previousOperationMetadata: getOperationMetadata(operationsEntry.previous),
329-
},
326+
metadata: getOperationMetadata(operationsEntry.current),
327+
previousMetadata: getOperationMetadata(operationsEntry.previous),
330328
}
331329
validateBwcBreakingChanges(changedOperation)
332330
changedOperations.set(operationId, changedOperation)

src/types/internal/compare.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ export type GraphQLChangesMetadata = {
4545
export type OperationChangesMetadata = {
4646
title: string
4747
tags: string[]
48-
previousOperationMetadata?: OperationChangesMetadata
4948
} & Partial<RestChangesMetadata> & Partial<GraphQLChangesMetadata>
5049

5150
export interface OperationChanges<T extends DiffType | DiffTypeDto = DiffType> {

0 commit comments

Comments
 (0)