@fractary/faber-cli 1.3.7 → 1.3.9

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.
@@ -279,15 +279,15 @@ async function planSingleIssue(issue, config, repoClient, anthropicClient, optio
279
279
  issueNumber: issue.number,
280
280
  });
281
281
  const planId = plan.plan_id;
282
- // Create branch
283
- if (!options.noBranch) {
282
+ // Create branch (only if not creating worktree, since worktree creation handles branch creation)
283
+ if (!options.noBranch && options.noWorktree) {
284
284
  if (outputFormat === 'text') {
285
285
  console.log(chalk.gray(` → Creating branch: ${branch}...`));
286
286
  process.stdout.write(''); // Force flush
287
287
  }
288
288
  await repoClient.createBranch(branch);
289
289
  }
290
- // Create worktree
290
+ // Create worktree (this will also create the branch automatically)
291
291
  let worktreePath = worktree;
292
292
  if (!options.noWorktree) {
293
293
  if (outputFormat === 'text') {
@@ -319,11 +319,28 @@ async function planSingleIssue(issue, config, repoClient, anthropicClient, optio
319
319
  if (outputFormat === 'text') {
320
320
  console.log(chalk.gray(` → Updating GitHub issue...`));
321
321
  }
322
- await repoClient.updateIssue({
323
- id: issue.number.toString(),
324
- comment: `🤖 Workflow plan created: ${planId}`,
325
- addLabel: 'faber:planned',
326
- });
322
+ try {
323
+ await repoClient.updateIssue({
324
+ id: issue.number.toString(),
325
+ comment: `🤖 Workflow plan created: ${planId}`,
326
+ addLabel: 'faber:planned',
327
+ });
328
+ }
329
+ catch (error) {
330
+ // If label doesn't exist, just add comment without label
331
+ if (error instanceof Error && error.message.includes('not found')) {
332
+ if (outputFormat === 'text') {
333
+ console.log(chalk.yellow(` ⚠️ Label 'faber:planned' not found, adding comment only`));
334
+ }
335
+ await repoClient.updateIssue({
336
+ id: issue.number.toString(),
337
+ comment: `🤖 Workflow plan created: ${planId}`,
338
+ });
339
+ }
340
+ else {
341
+ throw error;
342
+ }
343
+ }
327
344
  if (outputFormat === 'text') {
328
345
  console.log(chalk.green(` ✓ Plan: ${planId}`));
329
346
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fractary/faber-cli",
3
- "version": "1.3.7",
3
+ "version": "1.3.9",
4
4
  "description": "FABER CLI - Command-line interface for FABER development toolkit",
5
5
  "main": "dist/index.js",
6
6
  "bin": {