git-workspace-service 0.3.4 → 0.4.1
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 +19 -0
- package/dist/index.cjs +6 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -331,6 +331,25 @@ const parsed = parseBranchName('parallax/exec-123/engineer-auth-feature');
|
|
|
331
331
|
// Result: { executionId: 'exec-123', role: 'engineer', slug: 'auth-feature' }
|
|
332
332
|
```
|
|
333
333
|
|
|
334
|
+
### Custom Branch Names
|
|
335
|
+
|
|
336
|
+
If you need a specific branch name (e.g. for deterministic naming or external conventions), pass `branchName` in the workspace config to bypass auto-generation:
|
|
337
|
+
|
|
338
|
+
```typescript
|
|
339
|
+
const workspace = await workspaceService.provision({
|
|
340
|
+
repo: 'https://github.com/owner/repo',
|
|
341
|
+
branchStrategy: 'feature_branch',
|
|
342
|
+
baseBranch: 'main',
|
|
343
|
+
branchName: 'test/claude-nonce-abc123', // Used verbatim
|
|
344
|
+
execution: { id: 'exec-123', patternName: 'review' },
|
|
345
|
+
task: { id: 'task-456', role: 'engineer' },
|
|
346
|
+
});
|
|
347
|
+
|
|
348
|
+
console.log(workspace.branch.name); // 'test/claude-nonce-abc123'
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
When `branchName` is set, `isManagedBranch()` may return `false` for the resulting branch — this is expected since custom names intentionally bypass the naming convention. The branch is still created from `baseBranch` and works with both clone and worktree strategies.
|
|
352
|
+
|
|
334
353
|
## API Reference
|
|
335
354
|
|
|
336
355
|
### WorkspaceService
|
package/dist/index.cjs
CHANGED
|
@@ -364,7 +364,12 @@ var WorkspaceService = class {
|
|
|
364
364
|
});
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
|
-
const branchInfo =
|
|
367
|
+
const branchInfo = config.branchName ? {
|
|
368
|
+
name: config.branchName,
|
|
369
|
+
executionId: config.execution.id,
|
|
370
|
+
baseBranch: config.baseBranch,
|
|
371
|
+
createdAt: /* @__PURE__ */ new Date()
|
|
372
|
+
} : createBranchInfo(
|
|
368
373
|
{
|
|
369
374
|
executionId: config.execution.id,
|
|
370
375
|
role: config.task.role,
|