| author | |
| committer | |
| log | ea0487cc9adf9f51c865fe39128102afc532bcfc |
| tree | cfab1917769a9553f6d664ea7d75526245767455 |
| parent | a9caf7b7089afb6f1b3b888ea404b75b8f9e88e1 |
| signature | Signed by PGP key B5690EEEBB952194 |
2 files changed, 0 insertions(+), 17 deletions(-)
apps/web/src/components/pullRequest/pullRequestDetail.logic.test.ts-10| ... | ... | @@ -38,7 +38,6 @@ import { |
| 38 | 38 | shouldRefreshPullRequestActivity, |
| 39 | 39 | resolveBaseFreshness, |
| 40 | 40 | buildPullRequestTimeline, |
| 41 | describePullRequestState, | |
| 42 | 41 | editPullRequestThreadComment, |
| 43 | 42 | writePullRequestDetailSnapshot, |
| 44 | 43 | } from "./pullRequestDetail.logic"; |
| ... | ... | @@ -199,15 +198,6 @@ describe("pull request primary control", () => { |
| 199 | 198 | }); |
| 200 | 199 | }); |
| 201 | 200 | |
| 202 | describe("pull request state description", () => { | |
| 203 | it("keeps draft and conflicts orthogonal to the terminal states", () => { | |
| 204 | expect(describePullRequestState("open", true)).toBe("Draft"); | |
| 205 | expect(describePullRequestState("open", false)).toBe("Ready for review"); | |
| 206 | expect(describePullRequestState("merged", true)).toBe("Merged"); | |
| 207 | expect(describePullRequestState("closed", false)).toBe("Closed"); | |
| 208 | }); | |
| 209 | }); | |
| 210 | ||
| 211 | 201 | describe("pull request handoff labels", () => { |
| 212 | 202 | it("names the open thread when actions write to its composer", () => { |
| 213 | 203 | expect(pullRequestHandoffLabels(true)).toEqual({ |
apps/web/src/components/pullRequest/pullRequestDetail.logic.ts-7| ... | ... | @@ -189,13 +189,6 @@ export function isStackedPullRequestBase( |
| 189 | 189 | return defaultBranch !== baseBranch; |
| 190 | 190 | } |
| 191 | 191 | |
| 192 | /** Plain-language state, shown beside the author. Conflicts are a merge signal, not a state. */ | |
| 193 | export function describePullRequestState(state: PullRequestState, isDraft: boolean): string { | |
| 194 | if (state === "merged") return "Merged"; | |
| 195 | if (state === "closed") return "Closed"; | |
| 196 | return isDraft ? "Draft" : "Ready for review"; | |
| 197 | } | |
| 198 | ||
| 199 | 192 | /** Chronological ascending, oldest to newest — reversed for the "newest" reading order. */ |
| 200 | 193 | export function orderPullRequestComments<T extends { readonly createdAt: string }>( |
| 201 | 194 | comments: ReadonlyArray<T>, |