feat(governance): attach km archive history to dedupe groups
All checks were successful
Code Review / ai-code-review (push) Successful in 11s
CD Pipeline / tests (push) Successful in 6m56s
Type Sync Check / check-type-sync (push) Successful in 6m51s
CD Pipeline / build-and-deploy (push) Successful in 4m43s
CD Pipeline / post-deploy-checks (push) Successful in 1m47s
All checks were successful
Code Review / ai-code-review (push) Successful in 11s
CD Pipeline / tests (push) Successful in 6m56s
Type Sync Check / check-type-sync (push) Successful in 6m51s
CD Pipeline / build-and-deploy (push) Successful in 4m43s
CD Pipeline / post-deploy-checks (push) Successful in 1m47s
This commit is contained in:
@@ -273,6 +273,7 @@ type KnowledgeReviewDraftDedupeGroup = {
|
||||
owner_action: string;
|
||||
writes_on_read: boolean;
|
||||
can_archive_without_owner_approval: boolean;
|
||||
archive_history?: GovernanceQueueItem[];
|
||||
};
|
||||
|
||||
type KnowledgeReviewDraftDedupeResponse = {
|
||||
@@ -789,6 +790,9 @@ function kmArchiveTraceForDedupeGroup(
|
||||
group: KnowledgeReviewDraftDedupeGroup,
|
||||
queueItems: GovernanceQueueItem[]
|
||||
) {
|
||||
if (group.archive_history?.length) {
|
||||
return group.archive_history.slice(0, 3);
|
||||
}
|
||||
return queueItems
|
||||
.filter((item) =>
|
||||
item.governance_event_id === group.governance_event_id &&
|
||||
|
||||
Reference in New Issue
Block a user