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

pullRequestCheckoutToast.ts

19 lines776 Bytes

1import type { ChangeRequestTerminology } from "@t3tools/client-runtime/source-control-clients";
2import { msg } from "gt-react";
3​
4import { m } from "~/i18n/messages";
5​
6import { changeRequestTermKind } from "./changeRequestTerm";
7​
8export function offHeadPullRequestCheckoutToast(terminology: ChangeRequestTerminology) {
9 return {
10 type: "warning",
11 title: m(msg("Checked out, but not confirmed on the latest commit")),
12 description: m(
13 msg(
14 "This checkout could not be confirmed at the {term, select, mr {merge request} cr {change request} other {pull request}}'s latest commit, so its code may differ. Local commits or uncommitted work keep a checkout where it is.",
15 { term: changeRequestTermKind(terminology) },
16 ),
17 ),
18 } as const;