claude-issue-solver 1.19.4 โ 1.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/commands/clean.js +20 -17
- package/dist/commands/list.d.ts +2 -0
- package/dist/commands/list.js +7 -1
- package/dist/index.js +2 -0
- package/dist/utils/github.js +3 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -159,6 +159,8 @@ claude-issue --help
|
|
|
159
159
|
|
|
160
160
|
**`list` command:**
|
|
161
161
|
- `--verbose` - Show issue descriptions
|
|
162
|
+
- `-n, --limit <number>` - Maximum issues to show (default: 50)
|
|
163
|
+
- `--all` - Show all issues (no limit)
|
|
162
164
|
|
|
163
165
|
**`new` command:**
|
|
164
166
|
- `-b, --body <text>` - Issue description
|
package/dist/commands/clean.js
CHANGED
|
@@ -245,29 +245,32 @@ async function cleanAllCommand() {
|
|
|
245
245
|
})));
|
|
246
246
|
statusSpinner.stop();
|
|
247
247
|
console.log(chalk_1.default.bold('\n๐งน Found issue worktrees:\n'));
|
|
248
|
-
|
|
248
|
+
// Build choices for checkbox prompt
|
|
249
|
+
const choices = worktreesWithStatus.map((wt) => {
|
|
249
250
|
const status = getStatusLabel(wt);
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
}
|
|
257
|
-
const {
|
|
251
|
+
const isMerged = wt.prStatus?.state === 'merged';
|
|
252
|
+
return {
|
|
253
|
+
name: `#${wt.issueNumber}\t${status}`,
|
|
254
|
+
value: wt.issueNumber,
|
|
255
|
+
checked: isMerged, // Pre-select merged PRs
|
|
256
|
+
};
|
|
257
|
+
});
|
|
258
|
+
const { selected } = await inquirer_1.default.prompt([
|
|
258
259
|
{
|
|
259
|
-
type: '
|
|
260
|
-
name: '
|
|
261
|
-
message:
|
|
262
|
-
|
|
260
|
+
type: 'checkbox',
|
|
261
|
+
name: 'selected',
|
|
262
|
+
message: 'Select worktrees to clean (space to toggle, enter to confirm):',
|
|
263
|
+
choices,
|
|
263
264
|
},
|
|
264
265
|
]);
|
|
265
|
-
if (
|
|
266
|
-
console.log(chalk_1.default.dim('
|
|
266
|
+
if (selected.length === 0) {
|
|
267
|
+
console.log(chalk_1.default.dim('No worktrees selected.'));
|
|
267
268
|
return;
|
|
268
269
|
}
|
|
270
|
+
// Filter to only selected worktrees
|
|
271
|
+
const selectedWorktrees = worktrees.filter((wt) => selected.includes(wt.issueNumber));
|
|
269
272
|
console.log();
|
|
270
|
-
for (const wt of
|
|
273
|
+
for (const wt of selectedWorktrees) {
|
|
271
274
|
const spinner = (0, ora_1.default)(`Cleaning issue #${wt.issueNumber}...`).start();
|
|
272
275
|
try {
|
|
273
276
|
// Close terminal and VS Code windows for this worktree
|
|
@@ -349,7 +352,7 @@ async function cleanAllCommand() {
|
|
|
349
352
|
// Prune stale worktrees
|
|
350
353
|
(0, child_process_1.execSync)('git worktree prune', { cwd: projectRoot, stdio: 'pipe' });
|
|
351
354
|
console.log();
|
|
352
|
-
console.log(chalk_1.default.green(`โ
Cleaned up ${
|
|
355
|
+
console.log(chalk_1.default.green(`โ
Cleaned up ${selectedWorktrees.length} issue worktree(s)!`));
|
|
353
356
|
}
|
|
354
357
|
async function cleanCommand(issueNumber) {
|
|
355
358
|
const projectRoot = (0, git_1.getProjectRoot)();
|
package/dist/commands/list.d.ts
CHANGED
package/dist/commands/list.js
CHANGED
|
@@ -60,11 +60,17 @@ function formatBody(body, indent, termWidth) {
|
|
|
60
60
|
async function listCommand(options = {}) {
|
|
61
61
|
const projectName = (0, git_1.getProjectName)();
|
|
62
62
|
console.log(chalk_1.default.bold(`\nOpen issues for ${projectName}:\n`));
|
|
63
|
-
const
|
|
63
|
+
const limit = options.all ? 0 : (options.limit ?? 50);
|
|
64
|
+
const issues = (0, github_1.listIssues)(limit);
|
|
64
65
|
if (issues.length === 0) {
|
|
65
66
|
console.log(chalk_1.default.yellow('No open issues found.'));
|
|
66
67
|
return;
|
|
67
68
|
}
|
|
69
|
+
// Show hint if we hit the limit and user didn't explicitly set options
|
|
70
|
+
const hitLimit = !options.all && !options.limit && issues.length === limit;
|
|
71
|
+
if (hitLimit) {
|
|
72
|
+
console.log(chalk_1.default.dim(` Showing first ${limit} issues. Use --limit <n> or --all to see more.\n`));
|
|
73
|
+
}
|
|
68
74
|
const issuesWithPRs = (0, github_1.getIssuesWithOpenPRs)();
|
|
69
75
|
for (const issue of issues) {
|
|
70
76
|
const prTag = issuesWithPRs.has(issue.number) ? chalk_1.default.magenta(' [PR]') : '';
|
package/dist/index.js
CHANGED
|
@@ -68,6 +68,8 @@ program
|
|
|
68
68
|
.alias('ls')
|
|
69
69
|
.description('List open issues')
|
|
70
70
|
.option('--verbose', 'Show issue descriptions')
|
|
71
|
+
.option('-n, --limit <number>', 'Maximum number of issues to show', (val) => parseInt(val, 10))
|
|
72
|
+
.option('--all', 'Show all issues (no limit)')
|
|
71
73
|
.action((options) => (0, list_1.listCommand)(options));
|
|
72
74
|
// Show command
|
|
73
75
|
program
|
package/dist/utils/github.js
CHANGED
|
@@ -50,9 +50,10 @@ function getIssue(issueNumber) {
|
|
|
50
50
|
return null;
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
function listIssues(limit =
|
|
53
|
+
function listIssues(limit = 50) {
|
|
54
54
|
try {
|
|
55
|
-
const
|
|
55
|
+
const limitArg = limit > 0 ? `--limit ${limit}` : '';
|
|
56
|
+
const output = (0, child_process_1.execSync)(`gh issue list --state open ${limitArg} --json number,title,body,labels`, { encoding: 'utf-8', stdio: ['pipe', 'pipe', 'pipe'] });
|
|
56
57
|
return JSON.parse(output);
|
|
57
58
|
}
|
|
58
59
|
catch {
|