create-claude-workspace 2.3.17 → 2.3.18

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.
@@ -23,18 +23,20 @@ export function createPR(opts) {
23
23
  ? `${opts.body}\n\nCloses #${opts.issueNumber}`
24
24
  : opts.body;
25
25
  if (opts.platform === 'github') {
26
- const output = run('gh', [
26
+ // gh pr create outputs the PR URL on success
27
+ const url = run('gh', [
27
28
  'pr', 'create',
28
29
  '--title', opts.title,
29
30
  '--body', body,
30
31
  '--base', opts.baseBranch,
31
32
  '--head', opts.branch,
32
- '--json', 'number,url',
33
33
  ], opts.cwd, WRITE_TIMEOUT);
34
- const pr = JSON.parse(output);
34
+ // Extract PR number from URL: https://github.com/owner/repo/pull/123
35
+ const prNumMatch = url.match(/\/pull\/(\d+)/);
36
+ const prNumber = prNumMatch ? parseInt(prNumMatch[1], 10) : 0;
35
37
  return {
36
- number: pr.number,
37
- url: pr.url,
38
+ number: prNumber,
39
+ url: url.trim(),
38
40
  status: 'open',
39
41
  ciStatus: 'pending',
40
42
  approvals: 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-claude-workspace",
3
- "version": "2.3.17",
3
+ "version": "2.3.18",
4
4
  "author": "",
5
5
  "repository": {
6
6
  "type": "git",