claude-issue-solver 1.26.2 → 1.26.3

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,19 @@ 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, '\\"')}"`;
17
+ // Build args array to avoid shell escaping issues
18
+ const args = ['issue', 'create', '--title', title];
18
19
  if (body) {
19
- cmd += ` --body "${body.replace(/"/g, '\\"')}"`;
20
+ args.push('--body', body);
20
21
  }
21
22
  if (labels && labels.length > 0) {
22
23
  for (const label of labels) {
23
- cmd += ` --label "${label.replace(/"/g, '\\"')}"`;
24
+ args.push('--label', label);
24
25
  }
25
26
  }
27
+ // Use spawn-like approach with shell: false would be ideal, but execSync doesn't support it well
28
+ // Instead, use -- to prevent argument parsing issues and proper quoting
29
+ const cmd = `gh ${args.map(arg => `'${arg.replace(/'/g, "'\\''")}'`).join(' ')}`;
26
30
  const output = (0, child_process_1.execSync)(cmd, { encoding: 'utf-8', stdio: ['pipe', 'pipe', 'pipe'] });
27
31
  // Output is the issue URL, extract the number
28
32
  const match = output.trim().match(/\/issues\/(\d+)$/);
@@ -31,7 +35,11 @@ function createIssue(title, body, labels) {
31
35
  }
32
36
  return null;
33
37
  }
34
- catch {
38
+ catch (error) {
39
+ // Log error for debugging
40
+ if (process.env.DEBUG) {
41
+ console.error('createIssue error:', error.stderr?.toString() || error.message);
42
+ }
35
43
  return null;
36
44
  }
37
45
  }
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.3",
4
4
  "description": "Automatically solve GitHub issues using Claude Code",
5
5
  "main": "dist/index.js",
6
6
  "bin": {