claude-issue-solver 1.18.0 → 1.19.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 +8 -0
- package/dist/commands/list.d.ts +3 -1
- package/dist/commands/list.js +16 -1
- package/dist/commands/show.d.ts +1 -0
- package/dist/commands/show.js +26 -0
- package/dist/index.js +16 -2
- package/dist/utils/github.d.ts +1 -0
- package/dist/utils/github.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -114,6 +114,10 @@ claude-issue 42
|
|
|
114
114
|
# List open issues
|
|
115
115
|
claude-issue list
|
|
116
116
|
claude-issue ls
|
|
117
|
+
claude-issue list -v # Show descriptions
|
|
118
|
+
|
|
119
|
+
# Show full issue details
|
|
120
|
+
claude-issue show 42
|
|
117
121
|
|
|
118
122
|
# Create a new issue and solve it immediately
|
|
119
123
|
claude-issue new "Add dark mode support"
|
|
@@ -145,6 +149,7 @@ claude-issue --help
|
|
|
145
149
|
| `claude-issue <number>` | - | Solve specific issue |
|
|
146
150
|
| `claude-issue new <title>` | - | Create issue and solve it |
|
|
147
151
|
| `claude-issue list` | `ls` | List open issues |
|
|
152
|
+
| `claude-issue show <number>` | - | Show full issue details |
|
|
148
153
|
| `claude-issue pr <number>` | - | Create PR for solved issue |
|
|
149
154
|
| `claude-issue clean [number]` | `rm` | Remove worktree and branch |
|
|
150
155
|
| `claude-issue go [number]` | - | Navigate to worktree |
|
|
@@ -152,6 +157,9 @@ claude-issue --help
|
|
|
152
157
|
|
|
153
158
|
### Command Options
|
|
154
159
|
|
|
160
|
+
**`list` command:**
|
|
161
|
+
- `-v, --verbose` - Show issue descriptions
|
|
162
|
+
|
|
155
163
|
**`new` command:**
|
|
156
164
|
- `-b, --body <text>` - Issue description
|
|
157
165
|
- `-l, --label <name>` - Add label (can be used multiple times)
|
package/dist/commands/list.d.ts
CHANGED
package/dist/commands/list.js
CHANGED
|
@@ -7,7 +7,16 @@ exports.listCommand = listCommand;
|
|
|
7
7
|
const chalk_1 = __importDefault(require("chalk"));
|
|
8
8
|
const github_1 = require("../utils/github");
|
|
9
9
|
const git_1 = require("../utils/git");
|
|
10
|
-
|
|
10
|
+
function truncateBody(body, maxLength = 100) {
|
|
11
|
+
if (!body)
|
|
12
|
+
return '';
|
|
13
|
+
// Take first line or truncate
|
|
14
|
+
const firstLine = body.split('\n')[0].trim();
|
|
15
|
+
if (firstLine.length <= maxLength)
|
|
16
|
+
return firstLine;
|
|
17
|
+
return firstLine.substring(0, maxLength - 3) + '...';
|
|
18
|
+
}
|
|
19
|
+
async function listCommand(options = {}) {
|
|
11
20
|
const projectName = (0, git_1.getProjectName)();
|
|
12
21
|
console.log(chalk_1.default.bold(`\nOpen issues for ${projectName}:\n`));
|
|
13
22
|
const issues = (0, github_1.listIssues)();
|
|
@@ -22,6 +31,12 @@ async function listCommand() {
|
|
|
22
31
|
? ' ' + issue.labels.map(l => chalk_1.default.hex(`#${l.color}`).bold(`[${l.name}]`)).join(' ')
|
|
23
32
|
: '';
|
|
24
33
|
console.log(` ${chalk_1.default.cyan(`#${issue.number}`)}\t${issue.title}${prTag}${labels}`);
|
|
34
|
+
if (options.verbose && issue.body) {
|
|
35
|
+
const truncated = truncateBody(issue.body);
|
|
36
|
+
if (truncated) {
|
|
37
|
+
console.log(chalk_1.default.dim(` \t${truncated}`));
|
|
38
|
+
}
|
|
39
|
+
}
|
|
25
40
|
}
|
|
26
41
|
console.log();
|
|
27
42
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function showCommand(issueNumber: number): Promise<void>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.showCommand = showCommand;
|
|
7
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
8
|
+
const github_1 = require("../utils/github");
|
|
9
|
+
async function showCommand(issueNumber) {
|
|
10
|
+
const issue = (0, github_1.getIssue)(issueNumber);
|
|
11
|
+
if (!issue) {
|
|
12
|
+
console.log(chalk_1.default.red(`\n❌ Issue #${issueNumber} not found\n`));
|
|
13
|
+
process.exit(1);
|
|
14
|
+
}
|
|
15
|
+
console.log();
|
|
16
|
+
console.log(chalk_1.default.bold.cyan(`#${issue.number}`) + ' ' + chalk_1.default.bold(issue.title));
|
|
17
|
+
console.log(chalk_1.default.dim(issue.url));
|
|
18
|
+
console.log();
|
|
19
|
+
if (issue.body) {
|
|
20
|
+
console.log(issue.body);
|
|
21
|
+
}
|
|
22
|
+
else {
|
|
23
|
+
console.log(chalk_1.default.dim('No description provided.'));
|
|
24
|
+
}
|
|
25
|
+
console.log();
|
|
26
|
+
}
|
package/dist/index.js
CHANGED
|
@@ -16,13 +16,14 @@ const select_1 = require("./commands/select");
|
|
|
16
16
|
const go_1 = require("./commands/go");
|
|
17
17
|
const new_1 = require("./commands/new");
|
|
18
18
|
const init_1 = require("./commands/init");
|
|
19
|
+
const show_1 = require("./commands/show");
|
|
19
20
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
|
20
21
|
const packageJson = require('../package.json');
|
|
21
22
|
const program = new commander_1.Command();
|
|
22
23
|
program
|
|
23
24
|
.name('claude-issue')
|
|
24
25
|
.description('Automatically solve GitHub issues using Claude Code')
|
|
25
|
-
.version(packageJson.version);
|
|
26
|
+
.version(packageJson.version, '-v, --version', 'Show version number');
|
|
26
27
|
// Commands that skip requirements check
|
|
27
28
|
const skipRequirementsCommands = ['init'];
|
|
28
29
|
// Check requirements before any command (except init)
|
|
@@ -66,7 +67,20 @@ program
|
|
|
66
67
|
.command('list')
|
|
67
68
|
.alias('ls')
|
|
68
69
|
.description('List open issues')
|
|
69
|
-
.
|
|
70
|
+
.option('-v, --verbose', 'Show issue descriptions')
|
|
71
|
+
.action((options) => (0, list_1.listCommand)(options));
|
|
72
|
+
// Show command
|
|
73
|
+
program
|
|
74
|
+
.command('show <issue>')
|
|
75
|
+
.description('Show full details of an issue')
|
|
76
|
+
.action(async (issue) => {
|
|
77
|
+
const issueNumber = parseInt(issue, 10);
|
|
78
|
+
if (isNaN(issueNumber)) {
|
|
79
|
+
console.log(chalk_1.default.red(`❌ Invalid issue number: ${issue}`));
|
|
80
|
+
process.exit(1);
|
|
81
|
+
}
|
|
82
|
+
await (0, show_1.showCommand)(issueNumber);
|
|
83
|
+
});
|
|
70
84
|
// PR command
|
|
71
85
|
program
|
|
72
86
|
.command('pr <issue>')
|
package/dist/utils/github.d.ts
CHANGED
package/dist/utils/github.js
CHANGED
|
@@ -52,7 +52,7 @@ function getIssue(issueNumber) {
|
|
|
52
52
|
}
|
|
53
53
|
function listIssues(limit = 20) {
|
|
54
54
|
try {
|
|
55
|
-
const output = (0, child_process_1.execSync)(`gh issue list --state open --limit ${limit} --json number,title,labels`, { encoding: 'utf-8', stdio: ['pipe', 'pipe', 'pipe'] });
|
|
55
|
+
const output = (0, child_process_1.execSync)(`gh issue list --state open --limit ${limit} --json number,title,body,labels`, { encoding: 'utf-8', stdio: ['pipe', 'pipe', 'pipe'] });
|
|
56
56
|
return JSON.parse(output);
|
|
57
57
|
}
|
|
58
58
|
catch {
|