create-claude-workspace 2.2.1 → 2.2.2

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.
@@ -26,12 +26,15 @@ export function createPR(opts) {
26
26
  comments: [],
27
27
  };
28
28
  }
29
- // GitLab
30
- const output = cli(`glab mr create --title "${escapedTitle}" --description "${escapedBody}" --target-branch "${opts.baseBranch}" --source-branch "${opts.branch}" --no-editor --json iid,web_url`, opts.cwd, WRITE_TIMEOUT);
31
- const mr = JSON.parse(output);
29
+ // GitLab — glab mr create doesn't support --json, parse URL from output
30
+ const output = cli(`glab mr create --title "${escapedTitle}" --description "${escapedBody}" --target-branch "${opts.baseBranch}" --source-branch "${opts.branch}" --no-editor`, opts.cwd, WRITE_TIMEOUT);
31
+ // glab outputs the MR URL, e.g. "https://gitlab.com/group/repo/-/merge_requests/7"
32
+ const urlMatch = output.match(/https?:\/\/\S+merge_requests\/(\d+)/);
33
+ const mrIid = urlMatch ? parseInt(urlMatch[1], 10) : 0;
34
+ const mrUrl = urlMatch ? urlMatch[0] : output.trim();
32
35
  return {
33
- number: mr.iid,
34
- url: mr.web_url,
36
+ number: mrIid,
37
+ url: mrUrl,
35
38
  status: 'open',
36
39
  ciStatus: 'pending',
37
40
  approvals: 0,
@@ -83,7 +86,7 @@ function parseGitHubComments(comments) {
83
86
  }));
84
87
  }
85
88
  function getGitLabMRStatus(cwd, branch) {
86
- const output = cli(`glab mr view "${branch}" --json iid,web_url,state,merge_status,head_pipeline,user_notes_count`, cwd);
89
+ const output = cli(`glab mr view "${branch}" --output json`, cwd);
87
90
  const mr = JSON.parse(output);
88
91
  const ciStatus = resolveGitLabCIStatus(mr.head_pipeline);
89
92
  const mergeable = mr.merge_status === 'can_be_merged' && ciStatus === 'passed';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-claude-workspace",
3
- "version": "2.2.1",
3
+ "version": "2.2.2",
4
4
  "author": "",
5
5
  "repository": {
6
6
  "type": "git",