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

pullRequestCheckoutToast.ts

23 lines825 Bytes

1import type { ChangeRequestTerminology } from "@t3tools/client-runtime/source-control-clients";
2import { msg, select } 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`This checkout could not be confirmed at the ${select(
14 { term: changeRequestTermKind(terminology) },
15 {
16 mr: "merge request",
17 cr: "change request",
18 other: "pull request",
19 },
20 )}'s latest commit, so its code may differ. Local commits or uncommitted work keep a checkout where it is.`,
21 ),
22 } as const;