@gh-symphony/cli 0.0.8 → 0.0.10
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/dist/commands/project.js +39 -21
- package/package.json +5 -5
package/dist/commands/project.js
CHANGED
|
@@ -364,7 +364,7 @@ async function projectAddNonInteractive(flags, options) {
|
|
|
364
364
|
return;
|
|
365
365
|
}
|
|
366
366
|
const projectId = generateProjectId(project.title, project.id);
|
|
367
|
-
const workspaceDir = flags.workspaceDir ??
|
|
367
|
+
const workspaceDir = flags.workspaceDir ?? join(options.configDir, "workspaces");
|
|
368
368
|
await writeConfig(options.configDir, {
|
|
369
369
|
projectId,
|
|
370
370
|
project,
|
|
@@ -382,6 +382,7 @@ async function projectAddNonInteractive(flags, options) {
|
|
|
382
382
|
}
|
|
383
383
|
async function projectAddInteractive(options) {
|
|
384
384
|
p.intro("gh-symphony - Project Setup");
|
|
385
|
+
const defaultWorkspaceDir = join(options.configDir, "workspaces");
|
|
385
386
|
const existingConfig = await loadGlobalConfig(options.configDir);
|
|
386
387
|
if (existingConfig) {
|
|
387
388
|
const action = await abortIfCancelled(p.select({
|
|
@@ -451,7 +452,7 @@ async function projectAddInteractive(options) {
|
|
|
451
452
|
return;
|
|
452
453
|
}
|
|
453
454
|
const selectedProjectId = await abortIfCancelled(p.select({
|
|
454
|
-
message: "Step 1/
|
|
455
|
+
message: "Step 1/2 - Select a GitHub Project board:",
|
|
455
456
|
options: projects.map((project) => ({
|
|
456
457
|
value: project.id,
|
|
457
458
|
label: `${project.owner.login}/${project.title}`,
|
|
@@ -477,32 +478,49 @@ async function projectAddInteractive(options) {
|
|
|
477
478
|
process.exitCode = 1;
|
|
478
479
|
return;
|
|
479
480
|
}
|
|
480
|
-
const selectedRepos = await abortIfCancelled(p.multiselect({
|
|
481
|
-
message: "Step 2/4 - Select repositories to orchestrate:",
|
|
482
|
-
options: projectDetail.linkedRepositories.map((repo) => ({
|
|
483
|
-
value: repo,
|
|
484
|
-
label: `${repo.owner}/${repo.name}`,
|
|
485
|
-
})),
|
|
486
|
-
required: true,
|
|
487
|
-
}));
|
|
488
481
|
const assignedOnly = await abortIfCancelled(p.confirm({
|
|
489
|
-
message: "Step
|
|
482
|
+
message: "Step 2/2 - Only process issues assigned to the authenticated GitHub user?",
|
|
490
483
|
initialValue: false,
|
|
491
484
|
}));
|
|
492
|
-
const
|
|
493
|
-
message: "
|
|
494
|
-
|
|
495
|
-
defaultValue: `${options.configDir}/workspaces`,
|
|
496
|
-
validate(value) {
|
|
497
|
-
return value.trim().length > 0
|
|
498
|
-
? undefined
|
|
499
|
-
: "Workspace directory is required.";
|
|
500
|
-
},
|
|
485
|
+
const customizeAdvancedOptions = await abortIfCancelled(p.confirm({
|
|
486
|
+
message: "Customize advanced options? (default: No)",
|
|
487
|
+
initialValue: false,
|
|
501
488
|
}));
|
|
489
|
+
let selectedRepos = projectDetail.linkedRepositories;
|
|
490
|
+
let workspaceDir = defaultWorkspaceDir;
|
|
491
|
+
if (customizeAdvancedOptions) {
|
|
492
|
+
const filterRepositories = await abortIfCancelled(p.confirm({
|
|
493
|
+
message: "Filter specific repositories? (default: No)",
|
|
494
|
+
initialValue: false,
|
|
495
|
+
}));
|
|
496
|
+
if (filterRepositories) {
|
|
497
|
+
selectedRepos = await abortIfCancelled(p.multiselect({
|
|
498
|
+
message: "Select repositories to orchestrate:",
|
|
499
|
+
options: projectDetail.linkedRepositories.map((repo) => ({
|
|
500
|
+
value: repo,
|
|
501
|
+
label: `${repo.owner}/${repo.name}`,
|
|
502
|
+
})),
|
|
503
|
+
required: true,
|
|
504
|
+
}));
|
|
505
|
+
}
|
|
506
|
+
workspaceDir = await abortIfCancelled(p.text({
|
|
507
|
+
message: "Workspace root directory:",
|
|
508
|
+
placeholder: defaultWorkspaceDir,
|
|
509
|
+
defaultValue: defaultWorkspaceDir,
|
|
510
|
+
validate(value) {
|
|
511
|
+
return value.trim().length > 0
|
|
512
|
+
? undefined
|
|
513
|
+
: "Workspace directory is required.";
|
|
514
|
+
},
|
|
515
|
+
}));
|
|
516
|
+
}
|
|
517
|
+
const repoSummary = selectedRepos.length === projectDetail.linkedRepositories.length
|
|
518
|
+
? `${selectedRepos.map((repo) => `${repo.owner}/${repo.name}`).join(", ")} (all ${selectedRepos.length} linked)`
|
|
519
|
+
: `${selectedRepos.map((repo) => `${repo.owner}/${repo.name}`).join(", ")} (${selectedRepos.length} of ${projectDetail.linkedRepositories.length} linked)`;
|
|
502
520
|
p.note([
|
|
503
521
|
`User: ${login}`,
|
|
504
522
|
`Project: ${projectDetail.title}`,
|
|
505
|
-
`Repos: ${
|
|
523
|
+
`Repos: ${repoSummary}`,
|
|
506
524
|
`Assigned: ${assignedOnly ? `Only issues assigned to ${login}` : "All project issues"}`,
|
|
507
525
|
`Workspace: ${workspaceDir}`,
|
|
508
526
|
].join("\n"), "Configuration Summary");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gh-symphony/cli",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "hojinzs",
|
|
6
6
|
"description": "Interactive CLI for GitHub Symphony orchestration",
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@clack/prompts": "^0.9.1",
|
|
39
39
|
"commander": "^14.0.1",
|
|
40
|
-
"@gh-symphony/core": "0.0.
|
|
41
|
-
"@gh-symphony/orchestrator": "0.0.
|
|
42
|
-
"@gh-symphony/
|
|
43
|
-
"@gh-symphony/
|
|
40
|
+
"@gh-symphony/core": "0.0.10",
|
|
41
|
+
"@gh-symphony/orchestrator": "0.0.10",
|
|
42
|
+
"@gh-symphony/worker": "0.0.10",
|
|
43
|
+
"@gh-symphony/tracker-github": "0.0.10"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"build": "tsc -p tsconfig.json",
|