Skip to content

Commit 346a2d7

Browse files
refactor(web): remove unused pull request state label
1 parent d2c3e2e commit 346a2d7

2 files changed

Lines changed: 0 additions & 17 deletions

File tree

‎apps/web/src/components/pullRequest/pullRequestDetail.logic.test.ts‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ import {
3838
shouldRefreshPullRequestActivity,
3939
resolveBaseFreshness,
4040
buildPullRequestTimeline,
41-
describePullRequestState,
4241
editPullRequestThreadComment,
4342
writePullRequestDetailSnapshot,
4443
} from "./pullRequestDetail.logic";
@@ -199,15 +198,6 @@ describe("pull request primary control", () => {
199198
});
200199
});
201200

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-
211201
describe("pull request handoff labels", () => {
212202
it("names the open thread when actions write to its composer", () => {
213203
expect(pullRequestHandoffLabels(true)).toEqual({

‎apps/web/src/components/pullRequest/pullRequestDetail.logic.ts‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -189,13 +189,6 @@ export function isStackedPullRequestBase(
189189
return defaultBranch !== baseBranch;
190190
}
191191

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-
199192
/** Chronological ascending, oldest to newest — reversed for the "newest" reading order. */
200193
export function orderPullRequestComments<T extends { readonly createdAt: string }>(
201194
comments: ReadonlyArray<T>,

0 commit comments

Comments
 (0)