Skip to content

Commit e067f33

Browse files
committed
fix: translate keys
Signed-off-by: Umberto Sgueglia <usgueglia@contractor.linuxfoundation.org>
1 parent 4aaeaf9 commit e067f33

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

services/libs/data-access-layer/src/osspckgs/stewardships.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,15 @@ export const ESCALATION_RESOLUTION_PATHS = [
441441

442442
export type EscalationResolutionPath = (typeof ESCALATION_RESOLUTION_PATHS)[number]
443443

444+
export const ESCALATION_RESOLUTION_PATH_LABELS: Record<EscalationResolutionPath, string> = {
445+
right_of_first_refusal: 'Right of First Refusal',
446+
replace_the_dependency: 'Replace the Dependency',
447+
find_vendor_for_lts: 'Find Vendor for LTS',
448+
consortium_adopts_maintainership: 'Consortium Adopts Maintainership',
449+
compensating_controls_monitor: 'Compensating Controls / Monitor',
450+
namespace_takeover: 'Namespace Takeover',
451+
}
452+
444453
/**
445454
* Escalates a stewardship. Updates status to 'escalated' and logs the
446455
* chosen resolution path in stewardship_activity metadata.
@@ -478,7 +487,7 @@ export async function escalateStewardship(
478487
resolutionPath: data.resolutionPath,
479488
statusNote: data.notes ?? null,
480489
actorUserId: data.actorUserId,
481-
content: `Escalated with resolution path: ${data.resolutionPath}`,
490+
content: `Escalated with resolution path: ${ESCALATION_RESOLUTION_PATH_LABELS[data.resolutionPath]}`,
482491
metadata: JSON.stringify({
483492
resolutionPath: data.resolutionPath,
484493
...(data.notes ? { notes: data.notes } : {}),

0 commit comments

Comments
 (0)