Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

changeRequestTerm.ts

12 lines526 Bytes

1import type { ChangeRequestTerminology } from "@t3tools/client-runtime/source-control-clients";
2​
3/** Selects the noun in translated sentences, so each language writes the whole sentence per host term. */
4export type ChangeRequestTermKind = "mr" | "cr" | "pr";
5​
6export function changeRequestTermKind(
7 terminology: Pick<ChangeRequestTerminology, "singular">,
8): ChangeRequestTermKind {
9 if (terminology.singular === "merge request") return "mr";
10 if (terminology.singular === "change request") return "cr";
11 return "pr";