Skip to content
This repository was archived by the owner on Aug 6, 2026. It is now read-only.

Commit 9ce50ee

Browse files
committed
remove unused code
1 parent e55b8a5 commit 9ce50ee

4 files changed

Lines changed: 2 additions & 67 deletions

File tree

‎packages/core/src/commands/status.ts‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,8 @@ export async function status(
4747

4848
if (!statusResult.ok) return statusResult;
4949

50-
const {
51-
workingCopy,
52-
parents,
53-
modifiedFiles,
54-
conflicts,
55-
hasResolvedConflict,
56-
} = statusResult.value;
50+
const { parents, modifiedFiles, conflicts, hasResolvedConflict } =
51+
statusResult.value;
5752

5853
// Current change is the parent, not the WC
5954
const currentChange = parents[0] ?? null;

‎packages/core/src/github/pr-actions.ts‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -143,14 +143,6 @@ export function updatePR(
143143
});
144144
}
145145

146-
function _updatePRBase(
147-
prNumber: number,
148-
newBase: string,
149-
cwd = process.cwd(),
150-
): Promise<Result<void>> {
151-
return updatePR(prNumber, { base: newBase }, cwd);
152-
}
153-
154146
export async function updatePRBranch(
155147
prNumber: number,
156148
options?: { rebase?: boolean },

‎packages/core/src/github/pr-status.ts‎

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -78,20 +78,6 @@ function mapPRNodeToInfo(pr: GraphQLPRNode): PRInfo {
7878
};
7979
}
8080

81-
async function _getPRInfo(
82-
prNumber: number,
83-
cwd = process.cwd(),
84-
): Promise<Result<PRInfo>> {
85-
const result = await getMultiplePRInfos([prNumber], cwd);
86-
if (!result.ok) return result;
87-
88-
const info = result.value.get(prNumber);
89-
if (!info) {
90-
return err(createError("COMMAND_FAILED", `PR #${prNumber} not found`));
91-
}
92-
return ok(info);
93-
}
94-
9581
export async function getMultiplePRInfos(
9682
prNumbers: number[],
9783
cwd = process.cwd(),

‎packages/core/src/log.ts‎

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -68,44 +68,6 @@ export interface LogResult {
6868
uncommittedWork: UncommittedWork | null;
6969
}
7070

71-
function _formatDescriptionWithDate(
72-
description: string,
73-
timestamp: Date,
74-
): string {
75-
const now = new Date();
76-
const diffMs = now.getTime() - timestamp.getTime();
77-
const diffDays = Math.floor(diffMs / (1000 * 60 * 60 * 24));
78-
79-
// Only add date prefix if older than today
80-
if (diffDays >= 1) {
81-
const month = timestamp.toLocaleString("en-US", { month: "short" });
82-
const day = timestamp.getDate();
83-
return `[${month} ${day}] ${description}`;
84-
}
85-
return description;
86-
}
87-
88-
function _formatRelativeTime(date: Date): string {
89-
const now = new Date();
90-
const diffMs = now.getTime() - date.getTime();
91-
const diffSecs = Math.floor(diffMs / 1000);
92-
const diffMins = Math.floor(diffSecs / 60);
93-
const diffHours = Math.floor(diffMins / 60);
94-
const diffDays = Math.floor(diffHours / 24);
95-
const diffWeeks = Math.floor(diffDays / 7);
96-
const diffMonths = Math.floor(diffDays / 30);
97-
98-
if (diffSecs < 60) return "just now";
99-
if (diffMins < 60)
100-
return `${diffMins} minute${diffMins === 1 ? "" : "s"} ago`;
101-
if (diffHours < 24)
102-
return `${diffHours} hour${diffHours === 1 ? "" : "s"} ago`;
103-
if (diffDays < 7) return `${diffDays} day${diffDays === 1 ? "" : "s"} ago`;
104-
if (diffWeeks < 4)
105-
return `${diffWeeks} week${diffWeeks === 1 ? "" : "s"} ago`;
106-
return `${diffMonths} month${diffMonths === 1 ? "" : "s"} ago`;
107-
}
108-
10971
export function buildTree(changes: Changeset[], trunkId: string): LogNode[] {
11072
const nodeMap = new Map<string, LogNode>();
11173
const hasChild = new Set<string>();

0 commit comments

Comments
 (0)