Skip to content

Commit 0f79b6b

Browse files
maystudiosclaude
andcommitted
fix: type annotations, lint fixes, and docs command count update
- client.ts: fix Octokit type in throttle callback (unknown instead of Octokit) - discussions.ts: add explicit type annotations for GraphQL query variables - milestones.ts: explicit cast for dueOn parameter - commands-core.md: update command count to 14 (13 primary + 1 alias) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent e0bc2ce commit 0f79b6b

4 files changed

Lines changed: 12 additions & 10 deletions

File tree

packages/cli/src/github/client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export function getOctokit(): Octokit {
2323
_octokit = new OctokitWithPlugins({
2424
auth: token,
2525
throttle: {
26-
onRateLimit: (_retryAfter: number, _options: Record<string, unknown>, _oct: Octokit, retryCount: number) => {
26+
onRateLimit: (_retryAfter: number, _options: Record<string, unknown>, _oct: unknown, retryCount: number) => {
2727
return retryCount < 2;
2828
},
2929
onSecondaryRateLimit: () => {

packages/cli/src/github/discussions.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -261,9 +261,9 @@ export function listDiscussions(
261261

262262
while (hasNextPage) {
263263
const afterClause = endCursor ? `, after: $after` : '';
264-
const afterVar = endCursor ? ', $after: String!' : '';
264+
const afterVar: string = endCursor ? ', $after: String!' : '';
265265

266-
const query = `
266+
const query: string = `
267267
query($owner: String!, $repo: String!, $first: Int!${hasCategory ? ', $categoryId: ID!' : ''}${afterVar}) {
268268
repository(owner: $owner, name: $repo) {
269269
discussions(first: $first${hasCategory ? ', categoryId: $categoryId' : ''}${afterClause}) {
@@ -286,7 +286,7 @@ export function listDiscussions(
286286
}
287287
`.trim();
288288

289-
const args = [
289+
const args: string[] = [
290290
'api', 'graphql',
291291
'-f', `query=${query}`,
292292
'-f', `owner=${owner}`,
@@ -302,7 +302,7 @@ export function listDiscussions(
302302
args.push('-f', `after=${endCursor}`);
303303
}
304304

305-
const result = ghJson<{
305+
interface DiscussionsResponse {
306306
data: {
307307
repository: {
308308
discussions: {
@@ -311,15 +311,17 @@ export function listDiscussions(
311311
};
312312
};
313313
};
314-
}>(args);
314+
}
315+
316+
const result: GhResult<DiscussionsResponse> = ghJson<DiscussionsResponse>(args);
315317

316318
if (!result.ok) return result;
317319

318320
const discussions = result.data?.data?.repository?.discussions;
319-
const nodes = discussions?.nodes ?? [];
321+
const nodes: RawDiscussion[] = discussions?.nodes ?? [];
320322
allNodes.push(...nodes);
321323

322-
const pageInfo = discussions?.pageInfo;
324+
const pageInfo: { hasNextPage: boolean; endCursor: string | null } | undefined = discussions?.pageInfo;
323325
hasNextPage = pageInfo?.hasNextPage ?? false;
324326
endCursor = pageInfo?.endCursor ?? null;
325327
}

packages/cli/src/github/milestones.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ export async function updateMilestone(
130130
title: params.title,
131131
description: params.description,
132132
state: params.state,
133-
due_on: params.dueOn,
133+
due_on: params.dueOn as string | undefined,
134134
});
135135

136136
return {

packages/website/src/content/docs/commands-core.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Core Commands
44
group: Commands Reference
55
---
66

7-
MaxsimCLI provides 13 commands, each mapped to a slash command inside Claude Code. Every command dispatches one or more subagents with fresh context windows, reads state from GitHub, and writes results back to GitHub.
7+
MaxsimCLI provides 14 commands (13 primary + 1 alias), each mapped to a slash command inside Claude Code. Every command dispatches one or more subagents with fresh context windows, reads state from GitHub, and writes results back to GitHub.
88

99
### Command overview
1010

0 commit comments

Comments
 (0)