claude-issue-solver 1.26.2 → 1.26.4

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.
@@ -14,15 +14,16 @@ const util_1 = require("util");
14
14
  const execAsync = (0, util_1.promisify)(child_process_1.exec);
15
15
  function createIssue(title, body, labels) {
16
16
  try {
17
- let cmd = `gh issue create --title "${title.replace(/"/g, '\\"')}"`;
18
- if (body) {
19
- cmd += ` --body "${body.replace(/"/g, '\\"')}"`;
20
- }
17
+ // Build args array to avoid shell escaping issues
18
+ // Note: gh issue create requires both --title and --body when non-interactive
19
+ const args = ['issue', 'create', '--title', title, '--body', body || title];
21
20
  if (labels && labels.length > 0) {
22
21
  for (const label of labels) {
23
- cmd += ` --label "${label.replace(/"/g, '\\"')}"`;
22
+ args.push('--label', label);
24
23
  }
25
24
  }
25
+ // Use single quotes with proper escaping for shell safety
26
+ const cmd = `gh ${args.map(arg => `'${arg.replace(/'/g, "'\\''")}'`).join(' ')}`;
26
27
  const output = (0, child_process_1.execSync)(cmd, { encoding: 'utf-8', stdio: ['pipe', 'pipe', 'pipe'] });
27
28
  // Output is the issue URL, extract the number
28
29
  const match = output.trim().match(/\/issues\/(\d+)$/);
@@ -31,7 +32,11 @@ function createIssue(title, body, labels) {
31
32
  }
32
33
  return null;
33
34
  }
34
- catch {
35
+ catch (error) {
36
+ // Log error for debugging
37
+ if (process.env.DEBUG) {
38
+ console.error('createIssue error:', error.stderr?.toString() || error.message);
39
+ }
35
40
  return null;
36
41
  }
37
42
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-issue-solver",
3
- "version": "1.26.2",
3
+ "version": "1.26.4",
4
4
  "description": "Automatically solve GitHub issues using Claude Code",
5
5
  "main": "dist/index.js",
6
6
  "bin": {