claude-autopm 2.7.0 ā 2.8.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.
- package/README.md +307 -56
- package/autopm/.claude/.env +158 -0
- package/autopm/.claude/settings.local.json +9 -0
- package/bin/autopm.js +11 -2
- package/bin/commands/epic.js +23 -3
- package/bin/commands/plugin.js +395 -0
- package/bin/commands/team.js +184 -10
- package/install/install.js +223 -4
- package/lib/cli/commands/issue.js +360 -20
- package/lib/plugins/PluginManager.js +1328 -0
- package/lib/plugins/PluginManager.old.js +400 -0
- package/lib/providers/AzureDevOpsProvider.js +575 -0
- package/lib/providers/GitHubProvider.js +475 -0
- package/lib/services/EpicService.js +1092 -3
- package/lib/services/IssueService.js +991 -0
- package/package.json +9 -1
- package/scripts/publish-plugins.sh +166 -0
- package/autopm/.claude/agents/cloud/README.md +0 -55
- package/autopm/.claude/agents/cloud/aws-cloud-architect.md +0 -521
- package/autopm/.claude/agents/cloud/azure-cloud-architect.md +0 -436
- package/autopm/.claude/agents/cloud/gcp-cloud-architect.md +0 -385
- package/autopm/.claude/agents/cloud/gcp-cloud-functions-engineer.md +0 -306
- package/autopm/.claude/agents/cloud/gemini-api-expert.md +0 -880
- package/autopm/.claude/agents/cloud/kubernetes-orchestrator.md +0 -566
- package/autopm/.claude/agents/cloud/openai-python-expert.md +0 -1087
- package/autopm/.claude/agents/cloud/terraform-infrastructure-expert.md +0 -454
- package/autopm/.claude/agents/core/agent-manager.md +0 -296
- package/autopm/.claude/agents/core/code-analyzer.md +0 -131
- package/autopm/.claude/agents/core/file-analyzer.md +0 -162
- package/autopm/.claude/agents/core/test-runner.md +0 -200
- package/autopm/.claude/agents/data/airflow-orchestration-expert.md +0 -52
- package/autopm/.claude/agents/data/kedro-pipeline-expert.md +0 -50
- package/autopm/.claude/agents/data/langgraph-workflow-expert.md +0 -520
- package/autopm/.claude/agents/databases/README.md +0 -50
- package/autopm/.claude/agents/databases/bigquery-expert.md +0 -392
- package/autopm/.claude/agents/databases/cosmosdb-expert.md +0 -368
- package/autopm/.claude/agents/databases/mongodb-expert.md +0 -398
- package/autopm/.claude/agents/databases/postgresql-expert.md +0 -321
- package/autopm/.claude/agents/databases/redis-expert.md +0 -52
- package/autopm/.claude/agents/devops/README.md +0 -52
- package/autopm/.claude/agents/devops/azure-devops-specialist.md +0 -308
- package/autopm/.claude/agents/devops/docker-containerization-expert.md +0 -298
- package/autopm/.claude/agents/devops/github-operations-specialist.md +0 -335
- package/autopm/.claude/agents/devops/mcp-context-manager.md +0 -319
- package/autopm/.claude/agents/devops/observability-engineer.md +0 -574
- package/autopm/.claude/agents/devops/ssh-operations-expert.md +0 -1093
- package/autopm/.claude/agents/devops/traefik-proxy-expert.md +0 -444
- package/autopm/.claude/agents/frameworks/README.md +0 -64
- package/autopm/.claude/agents/frameworks/e2e-test-engineer.md +0 -360
- package/autopm/.claude/agents/frameworks/nats-messaging-expert.md +0 -254
- package/autopm/.claude/agents/frameworks/react-frontend-engineer.md +0 -217
- package/autopm/.claude/agents/frameworks/react-ui-expert.md +0 -226
- package/autopm/.claude/agents/frameworks/tailwindcss-expert.md +0 -770
- package/autopm/.claude/agents/frameworks/ux-design-expert.md +0 -244
- package/autopm/.claude/agents/integration/message-queue-engineer.md +0 -794
- package/autopm/.claude/agents/languages/README.md +0 -50
- package/autopm/.claude/agents/languages/bash-scripting-expert.md +0 -541
- package/autopm/.claude/agents/languages/javascript-frontend-engineer.md +0 -197
- package/autopm/.claude/agents/languages/nodejs-backend-engineer.md +0 -226
- package/autopm/.claude/agents/languages/python-backend-engineer.md +0 -214
- package/autopm/.claude/agents/languages/python-backend-expert.md +0 -289
- package/autopm/.claude/agents/testing/frontend-testing-engineer.md +0 -395
- package/autopm/.claude/commands/ai/langgraph-workflow.md +0 -65
- package/autopm/.claude/commands/ai/openai-chat.md +0 -65
- package/autopm/.claude/commands/azure/COMMANDS.md +0 -107
- package/autopm/.claude/commands/azure/COMMAND_MAPPING.md +0 -252
- package/autopm/.claude/commands/azure/INTEGRATION_FIX.md +0 -103
- package/autopm/.claude/commands/azure/README.md +0 -246
- package/autopm/.claude/commands/azure/active-work.md +0 -198
- package/autopm/.claude/commands/azure/aliases.md +0 -143
- package/autopm/.claude/commands/azure/blocked-items.md +0 -287
- package/autopm/.claude/commands/azure/clean.md +0 -93
- package/autopm/.claude/commands/azure/docs-query.md +0 -48
- package/autopm/.claude/commands/azure/feature-decompose.md +0 -380
- package/autopm/.claude/commands/azure/feature-list.md +0 -61
- package/autopm/.claude/commands/azure/feature-new.md +0 -115
- package/autopm/.claude/commands/azure/feature-show.md +0 -205
- package/autopm/.claude/commands/azure/feature-start.md +0 -130
- package/autopm/.claude/commands/azure/fix-integration-example.md +0 -93
- package/autopm/.claude/commands/azure/help.md +0 -150
- package/autopm/.claude/commands/azure/import-us.md +0 -269
- package/autopm/.claude/commands/azure/init.md +0 -211
- package/autopm/.claude/commands/azure/next-task.md +0 -262
- package/autopm/.claude/commands/azure/search.md +0 -160
- package/autopm/.claude/commands/azure/sprint-status.md +0 -235
- package/autopm/.claude/commands/azure/standup.md +0 -260
- package/autopm/.claude/commands/azure/sync-all.md +0 -99
- package/autopm/.claude/commands/azure/task-analyze.md +0 -186
- package/autopm/.claude/commands/azure/task-close.md +0 -329
- package/autopm/.claude/commands/azure/task-edit.md +0 -145
- package/autopm/.claude/commands/azure/task-list.md +0 -263
- package/autopm/.claude/commands/azure/task-new.md +0 -84
- package/autopm/.claude/commands/azure/task-reopen.md +0 -79
- package/autopm/.claude/commands/azure/task-show.md +0 -126
- package/autopm/.claude/commands/azure/task-start.md +0 -301
- package/autopm/.claude/commands/azure/task-status.md +0 -65
- package/autopm/.claude/commands/azure/task-sync.md +0 -67
- package/autopm/.claude/commands/azure/us-edit.md +0 -164
- package/autopm/.claude/commands/azure/us-list.md +0 -202
- package/autopm/.claude/commands/azure/us-new.md +0 -265
- package/autopm/.claude/commands/azure/us-parse.md +0 -253
- package/autopm/.claude/commands/azure/us-show.md +0 -188
- package/autopm/.claude/commands/azure/us-status.md +0 -320
- package/autopm/.claude/commands/azure/validate.md +0 -86
- package/autopm/.claude/commands/azure/work-item-sync.md +0 -47
- package/autopm/.claude/commands/cloud/infra-deploy.md +0 -38
- package/autopm/.claude/commands/github/workflow-create.md +0 -42
- package/autopm/.claude/commands/infrastructure/ssh-security.md +0 -65
- package/autopm/.claude/commands/infrastructure/traefik-setup.md +0 -65
- package/autopm/.claude/commands/kubernetes/deploy.md +0 -37
- package/autopm/.claude/commands/playwright/test-scaffold.md +0 -38
- package/autopm/.claude/commands/pm/blocked.md +0 -28
- package/autopm/.claude/commands/pm/clean.md +0 -119
- package/autopm/.claude/commands/pm/context-create.md +0 -136
- package/autopm/.claude/commands/pm/context-prime.md +0 -170
- package/autopm/.claude/commands/pm/context-update.md +0 -292
- package/autopm/.claude/commands/pm/context.md +0 -28
- package/autopm/.claude/commands/pm/epic-close.md +0 -86
- package/autopm/.claude/commands/pm/epic-decompose.md +0 -370
- package/autopm/.claude/commands/pm/epic-edit.md +0 -83
- package/autopm/.claude/commands/pm/epic-list.md +0 -30
- package/autopm/.claude/commands/pm/epic-merge.md +0 -222
- package/autopm/.claude/commands/pm/epic-oneshot.md +0 -119
- package/autopm/.claude/commands/pm/epic-refresh.md +0 -119
- package/autopm/.claude/commands/pm/epic-show.md +0 -28
- package/autopm/.claude/commands/pm/epic-split.md +0 -120
- package/autopm/.claude/commands/pm/epic-start.md +0 -195
- package/autopm/.claude/commands/pm/epic-status.md +0 -28
- package/autopm/.claude/commands/pm/epic-sync-modular.md +0 -338
- package/autopm/.claude/commands/pm/epic-sync-original.md +0 -473
- package/autopm/.claude/commands/pm/epic-sync.md +0 -486
- package/autopm/.claude/commands/pm/help.md +0 -28
- package/autopm/.claude/commands/pm/import.md +0 -115
- package/autopm/.claude/commands/pm/in-progress.md +0 -28
- package/autopm/.claude/commands/pm/init.md +0 -28
- package/autopm/.claude/commands/pm/issue-analyze.md +0 -202
- package/autopm/.claude/commands/pm/issue-close.md +0 -119
- package/autopm/.claude/commands/pm/issue-edit.md +0 -93
- package/autopm/.claude/commands/pm/issue-reopen.md +0 -87
- package/autopm/.claude/commands/pm/issue-show.md +0 -41
- package/autopm/.claude/commands/pm/issue-start.md +0 -234
- package/autopm/.claude/commands/pm/issue-status.md +0 -95
- package/autopm/.claude/commands/pm/issue-sync.md +0 -411
- package/autopm/.claude/commands/pm/next.md +0 -28
- package/autopm/.claude/commands/pm/prd-edit.md +0 -82
- package/autopm/.claude/commands/pm/prd-list.md +0 -28
- package/autopm/.claude/commands/pm/prd-new.md +0 -55
- package/autopm/.claude/commands/pm/prd-parse.md +0 -42
- package/autopm/.claude/commands/pm/prd-status.md +0 -28
- package/autopm/.claude/commands/pm/search.md +0 -28
- package/autopm/.claude/commands/pm/standup.md +0 -28
- package/autopm/.claude/commands/pm/status.md +0 -28
- package/autopm/.claude/commands/pm/sync.md +0 -99
- package/autopm/.claude/commands/pm/test-reference-update.md +0 -151
- package/autopm/.claude/commands/pm/validate.md +0 -28
- package/autopm/.claude/commands/pm/what-next.md +0 -28
- package/autopm/.claude/commands/python/api-scaffold.md +0 -50
- package/autopm/.claude/commands/python/docs-query.md +0 -48
- package/autopm/.claude/commands/react/app-scaffold.md +0 -50
- package/autopm/.claude/commands/testing/prime.md +0 -314
- package/autopm/.claude/commands/testing/run.md +0 -125
- package/autopm/.claude/commands/ui/bootstrap-scaffold.md +0 -65
- package/autopm/.claude/commands/ui/tailwind-system.md +0 -64
- package/autopm/.claude/rules/ai-integration-patterns.md +0 -219
- package/autopm/.claude/rules/ci-cd-kubernetes-strategy.md +0 -25
- package/autopm/.claude/rules/database-management-strategy.md +0 -17
- package/autopm/.claude/rules/database-pipeline.md +0 -94
- package/autopm/.claude/rules/devops-troubleshooting-playbook.md +0 -450
- package/autopm/.claude/rules/docker-first-development.md +0 -404
- package/autopm/.claude/rules/infrastructure-pipeline.md +0 -128
- package/autopm/.claude/rules/performance-guidelines.md +0 -403
- package/autopm/.claude/rules/ui-development-standards.md +0 -281
- package/autopm/.claude/rules/ui-framework-rules.md +0 -151
- package/autopm/.claude/rules/ux-design-rules.md +0 -209
- package/autopm/.claude/rules/visual-testing.md +0 -223
- package/autopm/.claude/scripts/azure/README.md +0 -192
- package/autopm/.claude/scripts/azure/active-work.js +0 -524
- package/autopm/.claude/scripts/azure/active-work.sh +0 -20
- package/autopm/.claude/scripts/azure/blocked.js +0 -520
- package/autopm/.claude/scripts/azure/blocked.sh +0 -20
- package/autopm/.claude/scripts/azure/daily.js +0 -533
- package/autopm/.claude/scripts/azure/daily.sh +0 -20
- package/autopm/.claude/scripts/azure/dashboard.js +0 -970
- package/autopm/.claude/scripts/azure/dashboard.sh +0 -20
- package/autopm/.claude/scripts/azure/feature-list.js +0 -254
- package/autopm/.claude/scripts/azure/feature-list.sh +0 -20
- package/autopm/.claude/scripts/azure/feature-show.js +0 -7
- package/autopm/.claude/scripts/azure/feature-show.sh +0 -20
- package/autopm/.claude/scripts/azure/feature-status.js +0 -604
- package/autopm/.claude/scripts/azure/feature-status.sh +0 -20
- package/autopm/.claude/scripts/azure/help.js +0 -342
- package/autopm/.claude/scripts/azure/help.sh +0 -20
- package/autopm/.claude/scripts/azure/next-task.js +0 -508
- package/autopm/.claude/scripts/azure/next-task.sh +0 -20
- package/autopm/.claude/scripts/azure/search.js +0 -469
- package/autopm/.claude/scripts/azure/search.sh +0 -20
- package/autopm/.claude/scripts/azure/setup.js +0 -745
- package/autopm/.claude/scripts/azure/setup.sh +0 -20
- package/autopm/.claude/scripts/azure/sprint-report.js +0 -1012
- package/autopm/.claude/scripts/azure/sprint-report.sh +0 -20
- package/autopm/.claude/scripts/azure/sync.js +0 -563
- package/autopm/.claude/scripts/azure/sync.sh +0 -20
- package/autopm/.claude/scripts/azure/us-list.js +0 -210
- package/autopm/.claude/scripts/azure/us-list.sh +0 -20
- package/autopm/.claude/scripts/azure/us-status.js +0 -238
- package/autopm/.claude/scripts/azure/us-status.sh +0 -20
- package/autopm/.claude/scripts/azure/validate.js +0 -626
- package/autopm/.claude/scripts/azure/validate.sh +0 -20
- package/autopm/.claude/scripts/azure/wrapper-template.sh +0 -20
- package/autopm/.claude/scripts/github/dependency-tracker.js +0 -554
- package/autopm/.claude/scripts/github/dependency-validator.js +0 -545
- package/autopm/.claude/scripts/github/dependency-visualizer.js +0 -477
- package/autopm/.claude/scripts/pm/analytics.js +0 -425
- package/autopm/.claude/scripts/pm/blocked.js +0 -164
- package/autopm/.claude/scripts/pm/blocked.sh +0 -78
- package/autopm/.claude/scripts/pm/clean.js +0 -464
- package/autopm/.claude/scripts/pm/context-create.js +0 -216
- package/autopm/.claude/scripts/pm/context-prime.js +0 -335
- package/autopm/.claude/scripts/pm/context-update.js +0 -344
- package/autopm/.claude/scripts/pm/context.js +0 -338
- package/autopm/.claude/scripts/pm/epic-close.js +0 -347
- package/autopm/.claude/scripts/pm/epic-edit.js +0 -382
- package/autopm/.claude/scripts/pm/epic-list.js +0 -273
- package/autopm/.claude/scripts/pm/epic-list.sh +0 -109
- package/autopm/.claude/scripts/pm/epic-show.js +0 -291
- package/autopm/.claude/scripts/pm/epic-show.sh +0 -105
- package/autopm/.claude/scripts/pm/epic-split.js +0 -522
- package/autopm/.claude/scripts/pm/epic-start/epic-start.js +0 -183
- package/autopm/.claude/scripts/pm/epic-start/epic-start.sh +0 -94
- package/autopm/.claude/scripts/pm/epic-status.js +0 -291
- package/autopm/.claude/scripts/pm/epic-status.sh +0 -104
- package/autopm/.claude/scripts/pm/epic-sync/README.md +0 -208
- package/autopm/.claude/scripts/pm/epic-sync/create-epic-issue.sh +0 -77
- package/autopm/.claude/scripts/pm/epic-sync/create-task-issues.sh +0 -86
- package/autopm/.claude/scripts/pm/epic-sync/update-epic-file.sh +0 -79
- package/autopm/.claude/scripts/pm/epic-sync/update-references.sh +0 -89
- package/autopm/.claude/scripts/pm/epic-sync.sh +0 -137
- package/autopm/.claude/scripts/pm/help.js +0 -92
- package/autopm/.claude/scripts/pm/help.sh +0 -90
- package/autopm/.claude/scripts/pm/in-progress.js +0 -178
- package/autopm/.claude/scripts/pm/in-progress.sh +0 -93
- package/autopm/.claude/scripts/pm/init.js +0 -321
- package/autopm/.claude/scripts/pm/init.sh +0 -178
- package/autopm/.claude/scripts/pm/issue-close.js +0 -232
- package/autopm/.claude/scripts/pm/issue-edit.js +0 -310
- package/autopm/.claude/scripts/pm/issue-show.js +0 -272
- package/autopm/.claude/scripts/pm/issue-start.js +0 -181
- package/autopm/.claude/scripts/pm/issue-sync/format-comment.sh +0 -468
- package/autopm/.claude/scripts/pm/issue-sync/gather-updates.sh +0 -460
- package/autopm/.claude/scripts/pm/issue-sync/post-comment.sh +0 -330
- package/autopm/.claude/scripts/pm/issue-sync/preflight-validation.sh +0 -348
- package/autopm/.claude/scripts/pm/issue-sync/update-frontmatter.sh +0 -387
- package/autopm/.claude/scripts/pm/lib/README.md +0 -85
- package/autopm/.claude/scripts/pm/lib/epic-discovery.js +0 -119
- package/autopm/.claude/scripts/pm/lib/logger.js +0 -78
- package/autopm/.claude/scripts/pm/next.js +0 -189
- package/autopm/.claude/scripts/pm/next.sh +0 -72
- package/autopm/.claude/scripts/pm/optimize.js +0 -407
- package/autopm/.claude/scripts/pm/pr-create.js +0 -337
- package/autopm/.claude/scripts/pm/pr-list.js +0 -257
- package/autopm/.claude/scripts/pm/prd-list.js +0 -242
- package/autopm/.claude/scripts/pm/prd-list.sh +0 -103
- package/autopm/.claude/scripts/pm/prd-new.js +0 -684
- package/autopm/.claude/scripts/pm/prd-parse.js +0 -547
- package/autopm/.claude/scripts/pm/prd-status.js +0 -152
- package/autopm/.claude/scripts/pm/prd-status.sh +0 -63
- package/autopm/.claude/scripts/pm/release.js +0 -460
- package/autopm/.claude/scripts/pm/search.js +0 -192
- package/autopm/.claude/scripts/pm/search.sh +0 -89
- package/autopm/.claude/scripts/pm/standup.js +0 -362
- package/autopm/.claude/scripts/pm/standup.sh +0 -95
- package/autopm/.claude/scripts/pm/status.js +0 -148
- package/autopm/.claude/scripts/pm/status.sh +0 -59
- package/autopm/.claude/scripts/pm/sync-batch.js +0 -337
- package/autopm/.claude/scripts/pm/sync.js +0 -343
- package/autopm/.claude/scripts/pm/template-list.js +0 -141
- package/autopm/.claude/scripts/pm/template-new.js +0 -366
- package/autopm/.claude/scripts/pm/validate.js +0 -274
- package/autopm/.claude/scripts/pm/validate.sh +0 -106
- package/autopm/.claude/scripts/pm/what-next.js +0 -660
- package/bin/node/azure-feature-show.js +0 -7
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
# PM Standup Script - Wrapper for Node.js implementation
|
|
4
|
-
# This wrapper maintains backward compatibility while delegating to the Node.js version
|
|
5
|
-
|
|
6
|
-
# Get the directory of this script
|
|
7
|
-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
8
|
-
|
|
9
|
-
# Check if Node.js is available
|
|
10
|
-
if command -v node >/dev/null 2>&1; then
|
|
11
|
-
# Use the Node.js implementation
|
|
12
|
-
node "$SCRIPT_DIR/standup.js"
|
|
13
|
-
exit $?
|
|
14
|
-
else
|
|
15
|
-
# Fallback to the original bash implementation if Node.js is not available
|
|
16
|
-
echo "ā ļø Node.js not found, falling back to bash implementation"
|
|
17
|
-
echo ""
|
|
18
|
-
|
|
19
|
-
# Original bash implementation (preserved for fallback)
|
|
20
|
-
echo "š
Daily Standup - $(date '+%Y-%m-%d')"
|
|
21
|
-
echo "================================"
|
|
22
|
-
echo ""
|
|
23
|
-
|
|
24
|
-
today=$(date '+%Y-%m-%d')
|
|
25
|
-
|
|
26
|
-
echo "Getting status..."
|
|
27
|
-
echo ""
|
|
28
|
-
echo ""
|
|
29
|
-
|
|
30
|
-
echo "š Today's Activity:"
|
|
31
|
-
echo "===================="
|
|
32
|
-
echo ""
|
|
33
|
-
|
|
34
|
-
# Find files modified today
|
|
35
|
-
recent_files=$(find .claude -name "*.md" -mtime -1 2>/dev/null)
|
|
36
|
-
|
|
37
|
-
if [ -n "$recent_files" ]; then
|
|
38
|
-
# Count by type
|
|
39
|
-
prd_count=$(echo "$recent_files" | grep -c "/prds/" || echo 0)
|
|
40
|
-
epic_count=$(echo "$recent_files" | grep -c "/epic.md" || echo 0)
|
|
41
|
-
task_count=$(echo "$recent_files" | grep -c "/[0-9]*.md" || echo 0)
|
|
42
|
-
update_count=$(echo "$recent_files" | grep -c "/updates/" || echo 0)
|
|
43
|
-
|
|
44
|
-
[ $prd_count -gt 0 ] && echo " ⢠Modified $prd_count PRD(s)"
|
|
45
|
-
[ $epic_count -gt 0 ] && echo " ⢠Updated $epic_count epic(s)"
|
|
46
|
-
[ $task_count -gt 0 ] && echo " ⢠Worked on $task_count task(s)"
|
|
47
|
-
[ $update_count -gt 0 ] && echo " ⢠Posted $update_count progress update(s)"
|
|
48
|
-
else
|
|
49
|
-
echo " No activity recorded today"
|
|
50
|
-
fi
|
|
51
|
-
|
|
52
|
-
echo ""
|
|
53
|
-
echo "š Currently In Progress:"
|
|
54
|
-
# Show active work items
|
|
55
|
-
for updates_dir in .claude/epics/*/updates/*/; do
|
|
56
|
-
[ -d "$updates_dir" ] || continue
|
|
57
|
-
if [ -f "$updates_dir/progress.md" ]; then
|
|
58
|
-
issue_num=$(basename "$updates_dir")
|
|
59
|
-
epic_name=$(basename $(dirname $(dirname "$updates_dir")))
|
|
60
|
-
completion=$(grep "^completion:" "$updates_dir/progress.md" | head -1 | sed 's/^completion: *//')
|
|
61
|
-
echo " ⢠Issue #$issue_num ($epic_name) - ${completion:-0%} complete"
|
|
62
|
-
fi
|
|
63
|
-
done
|
|
64
|
-
|
|
65
|
-
echo ""
|
|
66
|
-
echo "āļø Next Available Tasks:"
|
|
67
|
-
# Show top 3 available tasks
|
|
68
|
-
count=0
|
|
69
|
-
for epic_dir in .claude/epics/*/; do
|
|
70
|
-
[ -d "$epic_dir" ] || continue
|
|
71
|
-
for task_file in "$epic_dir"[0-9]*.md; do
|
|
72
|
-
[ -f "$task_file" ] || continue
|
|
73
|
-
status=$(grep "^status:" "$task_file" | head -1 | sed 's/^status: *//')
|
|
74
|
-
[ "$status" != "open" ] && [ -n "$status" ] && continue
|
|
75
|
-
|
|
76
|
-
deps=$(grep "^depends_on:" "$task_file" | head -1 | sed 's/^depends_on: *\[//' | sed 's/\]//')
|
|
77
|
-
if [ -z "$deps" ] || [ "$deps" = "depends_on:" ]; then
|
|
78
|
-
task_name=$(grep "^name:" "$task_file" | head -1 | sed 's/^name: *//')
|
|
79
|
-
task_num=$(basename "$task_file" .md)
|
|
80
|
-
echo " ⢠#$task_num - $task_name"
|
|
81
|
-
((count++))
|
|
82
|
-
[ $count -ge 3 ] && break 2
|
|
83
|
-
fi
|
|
84
|
-
done
|
|
85
|
-
done
|
|
86
|
-
|
|
87
|
-
echo ""
|
|
88
|
-
echo "š Quick Stats:"
|
|
89
|
-
total_tasks=$(find .claude/epics -name "[0-9]*.md" 2>/dev/null | wc -l)
|
|
90
|
-
open_tasks=$(find .claude/epics -name "[0-9]*.md" -exec grep -l "^status: *open" {} \; 2>/dev/null | wc -l)
|
|
91
|
-
closed_tasks=$(find .claude/epics -name "[0-9]*.md" -exec grep -l "^status: *closed" {} \; 2>/dev/null | wc -l)
|
|
92
|
-
echo " Tasks: $open_tasks open, $closed_tasks closed, $total_tasks total"
|
|
93
|
-
|
|
94
|
-
exit 0
|
|
95
|
-
fi
|
|
@@ -1,148 +0,0 @@
|
|
|
1
|
-
const fs = require('fs');
|
|
2
|
-
const path = require('path');
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* PM Status Script (Node.js version)
|
|
6
|
-
* Migrated from bash script with 100% backward compatibility
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
async function status() {
|
|
10
|
-
const result = {
|
|
11
|
-
prds: { total: 0, found: false },
|
|
12
|
-
epics: { total: 0, found: false },
|
|
13
|
-
tasks: { total: 0, open: 0, closed: 0, found: false },
|
|
14
|
-
messages: []
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
// Helper function to add messages
|
|
18
|
-
function addMessage(message) {
|
|
19
|
-
result.messages.push(message);
|
|
20
|
-
// Only log if running as CLI
|
|
21
|
-
if (require.main === module) {
|
|
22
|
-
console.log(message);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
// Header messages to match bash output exactly
|
|
27
|
-
addMessage('Getting status...');
|
|
28
|
-
addMessage('');
|
|
29
|
-
addMessage('');
|
|
30
|
-
addMessage('š Project Status');
|
|
31
|
-
addMessage('================');
|
|
32
|
-
addMessage('');
|
|
33
|
-
|
|
34
|
-
// Check PRDs
|
|
35
|
-
addMessage('š PRDs:');
|
|
36
|
-
try {
|
|
37
|
-
if (fs.existsSync('.claude/prds') && fs.statSync('.claude/prds').isDirectory()) {
|
|
38
|
-
const prdFiles = fs.readdirSync('.claude/prds')
|
|
39
|
-
.filter(file => file.endsWith('.md'));
|
|
40
|
-
|
|
41
|
-
result.prds.total = prdFiles.length;
|
|
42
|
-
result.prds.found = true;
|
|
43
|
-
addMessage(` Total: ${result.prds.total}`);
|
|
44
|
-
} else {
|
|
45
|
-
addMessage(' No PRDs found');
|
|
46
|
-
}
|
|
47
|
-
} catch (err) {
|
|
48
|
-
addMessage(' No PRDs found');
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
addMessage('');
|
|
52
|
-
|
|
53
|
-
// Check Epics
|
|
54
|
-
addMessage('š Epics:');
|
|
55
|
-
try {
|
|
56
|
-
if (fs.existsSync('.claude/epics') && fs.statSync('.claude/epics').isDirectory()) {
|
|
57
|
-
const epicDirs = fs.readdirSync('.claude/epics', { withFileTypes: true })
|
|
58
|
-
.filter(dirent => dirent.isDirectory())
|
|
59
|
-
.length;
|
|
60
|
-
|
|
61
|
-
result.epics.total = epicDirs;
|
|
62
|
-
result.epics.found = true;
|
|
63
|
-
addMessage(` Total: ${result.epics.total}`);
|
|
64
|
-
} else {
|
|
65
|
-
addMessage(' No epics found');
|
|
66
|
-
}
|
|
67
|
-
} catch (err) {
|
|
68
|
-
addMessage(' No epics found');
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
addMessage('');
|
|
72
|
-
|
|
73
|
-
// Check Tasks
|
|
74
|
-
addMessage('š Tasks:');
|
|
75
|
-
try {
|
|
76
|
-
if (fs.existsSync('.claude/epics') && fs.statSync('.claude/epics').isDirectory()) {
|
|
77
|
-
const epicDirs = fs.readdirSync('.claude/epics', { withFileTypes: true })
|
|
78
|
-
.filter(dirent => dirent.isDirectory())
|
|
79
|
-
.map(dirent => dirent.name);
|
|
80
|
-
|
|
81
|
-
let totalTasks = 0;
|
|
82
|
-
let openTasks = 0;
|
|
83
|
-
let closedTasks = 0;
|
|
84
|
-
|
|
85
|
-
for (const epicDir of epicDirs) {
|
|
86
|
-
const epicPath = path.join('.claude/epics', epicDir);
|
|
87
|
-
|
|
88
|
-
try {
|
|
89
|
-
const taskFiles = fs.readdirSync(epicPath)
|
|
90
|
-
.filter(file => /^[0-9].*\.md$/.test(file));
|
|
91
|
-
|
|
92
|
-
for (const taskFile of taskFiles) {
|
|
93
|
-
totalTasks++;
|
|
94
|
-
|
|
95
|
-
try {
|
|
96
|
-
const taskPath = path.join(epicPath, taskFile);
|
|
97
|
-
const content = fs.readFileSync(taskPath, 'utf8');
|
|
98
|
-
|
|
99
|
-
// Check status line
|
|
100
|
-
const statusMatch = content.match(/^status:\s*(.+)$/m);
|
|
101
|
-
const status = statusMatch ? statusMatch[1].trim() : '';
|
|
102
|
-
|
|
103
|
-
if (status === 'closed') {
|
|
104
|
-
closedTasks++;
|
|
105
|
-
} else {
|
|
106
|
-
// Anything that's not explicitly closed is considered open
|
|
107
|
-
openTasks++;
|
|
108
|
-
}
|
|
109
|
-
} catch (err) {
|
|
110
|
-
// If we can't read the file, count as open
|
|
111
|
-
openTasks++;
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
} catch (err) {
|
|
115
|
-
// Skip directories we can't read
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
result.tasks.total = totalTasks;
|
|
120
|
-
result.tasks.open = openTasks;
|
|
121
|
-
result.tasks.closed = closedTasks;
|
|
122
|
-
result.tasks.found = totalTasks > 0;
|
|
123
|
-
|
|
124
|
-
addMessage(` Open: ${result.tasks.open}`);
|
|
125
|
-
addMessage(` Closed: ${result.tasks.closed}`);
|
|
126
|
-
addMessage(` Total: ${result.tasks.total}`);
|
|
127
|
-
} else {
|
|
128
|
-
addMessage(' No tasks found');
|
|
129
|
-
}
|
|
130
|
-
} catch (err) {
|
|
131
|
-
addMessage(' No tasks found');
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
return result;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
// Export for use as module
|
|
138
|
-
module.exports = status;
|
|
139
|
-
|
|
140
|
-
// CLI execution
|
|
141
|
-
if (require.main === module) {
|
|
142
|
-
status().then(result => {
|
|
143
|
-
process.exit(0);
|
|
144
|
-
}).catch(err => {
|
|
145
|
-
console.error('Status failed:', err.message);
|
|
146
|
-
process.exit(1);
|
|
147
|
-
});
|
|
148
|
-
}
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
#!/bin/bash
|
|
2
|
-
|
|
3
|
-
# PM Status Script - Wrapper for Node.js implementation
|
|
4
|
-
# This wrapper maintains backward compatibility while delegating to the Node.js version
|
|
5
|
-
|
|
6
|
-
# Get the directory of this script
|
|
7
|
-
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
8
|
-
|
|
9
|
-
# Check if Node.js is available
|
|
10
|
-
if command -v node >/dev/null 2>&1; then
|
|
11
|
-
# Use the Node.js implementation
|
|
12
|
-
node "$SCRIPT_DIR/status.js"
|
|
13
|
-
exit $?
|
|
14
|
-
else
|
|
15
|
-
# Fallback to the original bash implementation if Node.js is not available
|
|
16
|
-
echo "ā ļø Node.js not found, falling back to bash implementation"
|
|
17
|
-
echo ""
|
|
18
|
-
|
|
19
|
-
# Original bash implementation (preserved for fallback)
|
|
20
|
-
echo "Getting status..."
|
|
21
|
-
echo ""
|
|
22
|
-
echo ""
|
|
23
|
-
|
|
24
|
-
echo "š Project Status"
|
|
25
|
-
echo "================"
|
|
26
|
-
echo ""
|
|
27
|
-
|
|
28
|
-
echo "š PRDs:"
|
|
29
|
-
if [ -d ".claude/prds" ]; then
|
|
30
|
-
total=$(ls .claude/prds/*.md 2>/dev/null | wc -l)
|
|
31
|
-
echo " Total: $total"
|
|
32
|
-
else
|
|
33
|
-
echo " No PRDs found"
|
|
34
|
-
fi
|
|
35
|
-
|
|
36
|
-
echo ""
|
|
37
|
-
echo "š Epics:"
|
|
38
|
-
if [ -d ".claude/epics" ]; then
|
|
39
|
-
total=$(ls -d .claude/epics/*/ 2>/dev/null | wc -l)
|
|
40
|
-
echo " Total: $total"
|
|
41
|
-
else
|
|
42
|
-
echo " No epics found"
|
|
43
|
-
fi
|
|
44
|
-
|
|
45
|
-
echo ""
|
|
46
|
-
echo "š Tasks:"
|
|
47
|
-
if [ -d ".claude/epics" ]; then
|
|
48
|
-
total=$(find .claude/epics -name "[0-9]*.md" 2>/dev/null | wc -l)
|
|
49
|
-
open=$(find .claude/epics -name "[0-9]*.md" -exec grep -l "^status: *open" {} \; 2>/dev/null | wc -l)
|
|
50
|
-
closed=$(find .claude/epics -name "[0-9]*.md" -exec grep -l "^status: *closed" {} \; 2>/dev/null | wc -l)
|
|
51
|
-
echo " Open: $open"
|
|
52
|
-
echo " Closed: $closed"
|
|
53
|
-
echo " Total: $total"
|
|
54
|
-
else
|
|
55
|
-
echo " No tasks found"
|
|
56
|
-
fi
|
|
57
|
-
|
|
58
|
-
exit 0
|
|
59
|
-
fi
|
|
@@ -1,337 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* Batch Sync Command
|
|
4
|
-
*
|
|
5
|
-
* Synchronize multiple PRDs/Epics/Tasks to GitHub in batch operations
|
|
6
|
-
* with parallel processing, rate limiting, and progress tracking.
|
|
7
|
-
*
|
|
8
|
-
* Usage:
|
|
9
|
-
* autopm sync:batch # Sync all items
|
|
10
|
-
* autopm sync:batch --type prd # Sync only PRDs
|
|
11
|
-
* autopm sync:batch --type epic # Sync only Epics
|
|
12
|
-
* autopm sync:batch --type task # Sync only Tasks
|
|
13
|
-
* autopm sync:batch --dry-run # Preview without syncing
|
|
14
|
-
* autopm sync:batch --concurrent 5 # Limit concurrency
|
|
15
|
-
*
|
|
16
|
-
* Features:
|
|
17
|
-
* - Parallel processing (default: 10 concurrent)
|
|
18
|
-
* - GitHub API rate limiting with backoff
|
|
19
|
-
* - Real-time progress tracking
|
|
20
|
-
* - Error recovery (continues on failures)
|
|
21
|
-
* - Dry run mode
|
|
22
|
-
*
|
|
23
|
-
* Performance:
|
|
24
|
-
* - 1000 items: < 30 seconds
|
|
25
|
-
* - Respects GitHub API limits (5000 req/hour)
|
|
26
|
-
* - Memory efficient: < 100MB for 1000 items
|
|
27
|
-
*/
|
|
28
|
-
|
|
29
|
-
const fs = require('fs').promises;
|
|
30
|
-
const path = require('path');
|
|
31
|
-
const { Octokit } = require('@octokit/rest');
|
|
32
|
-
const { batchSyncAll, batchSyncPRDs, batchSyncEpics, batchSyncTasks } = require('../../../../lib/batch-processor-integration');
|
|
33
|
-
|
|
34
|
-
class SyncBatchCommand {
|
|
35
|
-
constructor() {
|
|
36
|
-
this.basePath = '.claude';
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Get GitHub repository info from git remote
|
|
41
|
-
*/
|
|
42
|
-
async getRepoInfo() {
|
|
43
|
-
const { execSync } = require('child_process');
|
|
44
|
-
|
|
45
|
-
try {
|
|
46
|
-
const remoteUrl = execSync('git remote get-url origin', { encoding: 'utf8' }).trim();
|
|
47
|
-
|
|
48
|
-
// Parse GitHub URL: https://github.com/owner/repo.git or git@github.com:owner/repo.git
|
|
49
|
-
const match = remoteUrl.match(/github\.com[:/]([^/]+)\/(.+?)(\.git)?$/);
|
|
50
|
-
|
|
51
|
-
if (!match) {
|
|
52
|
-
throw new Error('Could not parse GitHub repository URL');
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
return {
|
|
56
|
-
owner: match[1],
|
|
57
|
-
repo: match[2]
|
|
58
|
-
};
|
|
59
|
-
} catch (error) {
|
|
60
|
-
throw new Error('Failed to get repository info. Are you in a Git repository with GitHub remote?');
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Show help message
|
|
66
|
-
*/
|
|
67
|
-
showHelp() {
|
|
68
|
-
console.log(`
|
|
69
|
-
š¦ Batch Sync Command
|
|
70
|
-
|
|
71
|
-
Synchronize multiple PRDs/Epics/Tasks to GitHub in parallel.
|
|
72
|
-
|
|
73
|
-
Usage:
|
|
74
|
-
autopm sync:batch [options]
|
|
75
|
-
|
|
76
|
-
Options:
|
|
77
|
-
--type <type> Type to sync: prd|epic|task|all (default: all)
|
|
78
|
-
--dry-run Preview without syncing
|
|
79
|
-
--concurrent <n> Max concurrent uploads (default: 10)
|
|
80
|
-
--help Show this help
|
|
81
|
-
|
|
82
|
-
Examples:
|
|
83
|
-
autopm sync:batch # Sync all items
|
|
84
|
-
autopm sync:batch --type prd # Sync only PRDs
|
|
85
|
-
autopm sync:batch --dry-run # Preview changes
|
|
86
|
-
autopm sync:batch --concurrent 5 # Limit to 5 parallel
|
|
87
|
-
|
|
88
|
-
Performance:
|
|
89
|
-
- 1000 items: ~30 seconds
|
|
90
|
-
- Rate limiting: Automatic backoff
|
|
91
|
-
- Memory: < 100MB for 1000 items
|
|
92
|
-
|
|
93
|
-
Environment:
|
|
94
|
-
GITHUB_TOKEN GitHub personal access token (required)
|
|
95
|
-
`);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/**
|
|
99
|
-
* Parse command line arguments
|
|
100
|
-
*/
|
|
101
|
-
parseArgs(args) {
|
|
102
|
-
const options = {
|
|
103
|
-
type: 'all',
|
|
104
|
-
dryRun: false,
|
|
105
|
-
maxConcurrent: 10
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
for (let i = 0; i < args.length; i++) {
|
|
109
|
-
const arg = args[i];
|
|
110
|
-
|
|
111
|
-
if (arg === '--help' || arg === '-h') {
|
|
112
|
-
this.showHelp();
|
|
113
|
-
process.exit(0);
|
|
114
|
-
} else if (arg === '--type' || arg === '-t') {
|
|
115
|
-
options.type = args[++i];
|
|
116
|
-
if (!['prd', 'epic', 'task', 'all'].includes(options.type)) {
|
|
117
|
-
throw new Error(`Invalid type: ${options.type}. Must be: prd|epic|task|all`);
|
|
118
|
-
}
|
|
119
|
-
} else if (arg === '--dry-run' || arg === '-d') {
|
|
120
|
-
options.dryRun = true;
|
|
121
|
-
} else if (arg === '--concurrent' || arg === '-c') {
|
|
122
|
-
options.maxConcurrent = parseInt(args[++i], 10);
|
|
123
|
-
if (isNaN(options.maxConcurrent) || options.maxConcurrent < 1) {
|
|
124
|
-
throw new Error('--concurrent must be a positive number');
|
|
125
|
-
}
|
|
126
|
-
} else {
|
|
127
|
-
throw new Error(`Unknown option: ${arg}. Use --help for usage.`);
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
return options;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
* Format duration in human-readable form
|
|
136
|
-
*/
|
|
137
|
-
formatDuration(ms) {
|
|
138
|
-
if (ms < 1000) {
|
|
139
|
-
return `${ms}ms`;
|
|
140
|
-
}
|
|
141
|
-
const seconds = Math.floor(ms / 1000);
|
|
142
|
-
const minutes = Math.floor(seconds / 60);
|
|
143
|
-
|
|
144
|
-
if (minutes > 0) {
|
|
145
|
-
return `${minutes}m ${seconds % 60}s`;
|
|
146
|
-
}
|
|
147
|
-
return `${seconds}s`;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* Print progress bar
|
|
152
|
-
*/
|
|
153
|
-
printProgress(type, current, total) {
|
|
154
|
-
const percentage = Math.floor((current / total) * 100);
|
|
155
|
-
const barLength = 30;
|
|
156
|
-
const filledLength = Math.floor((current / total) * barLength);
|
|
157
|
-
const bar = 'ā'.repeat(filledLength) + 'ā'.repeat(barLength - filledLength);
|
|
158
|
-
|
|
159
|
-
process.stdout.write(`\r [${type.toUpperCase().padEnd(5)}] ${bar} ${percentage}% (${current}/${total})`);
|
|
160
|
-
|
|
161
|
-
if (current === total) {
|
|
162
|
-
console.log(); // New line when complete
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
/**
|
|
167
|
-
* Run batch sync
|
|
168
|
-
*/
|
|
169
|
-
async run(args) {
|
|
170
|
-
try {
|
|
171
|
-
// Parse arguments
|
|
172
|
-
const options = this.parseArgs(args);
|
|
173
|
-
|
|
174
|
-
// Check for GitHub token
|
|
175
|
-
const githubToken = process.env.GITHUB_TOKEN;
|
|
176
|
-
if (!githubToken) {
|
|
177
|
-
console.error('ā Error: GITHUB_TOKEN environment variable not set');
|
|
178
|
-
console.error('\nSet your GitHub token:');
|
|
179
|
-
console.error(' export GITHUB_TOKEN=your_token_here');
|
|
180
|
-
console.error('\nOr create a .env file with:');
|
|
181
|
-
console.error(' GITHUB_TOKEN=your_token_here');
|
|
182
|
-
process.exit(1);
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
// Get repository info
|
|
186
|
-
console.log('š Detecting repository...');
|
|
187
|
-
const repo = await this.getRepoInfo();
|
|
188
|
-
console.log(` Repository: ${repo.owner}/${repo.repo}`);
|
|
189
|
-
|
|
190
|
-
// Initialize Octokit
|
|
191
|
-
const octokit = new Octokit({ auth: githubToken });
|
|
192
|
-
|
|
193
|
-
// Verify API access
|
|
194
|
-
try {
|
|
195
|
-
await octokit.rest.users.getAuthenticated();
|
|
196
|
-
} catch (error) {
|
|
197
|
-
console.error('ā GitHub authentication failed. Check your GITHUB_TOKEN.');
|
|
198
|
-
process.exit(1);
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
// Show configuration
|
|
202
|
-
console.log('\nāļø Configuration:');
|
|
203
|
-
console.log(` Type: ${options.type}`);
|
|
204
|
-
console.log(` Dry run: ${options.dryRun ? 'Yes' : 'No'}`);
|
|
205
|
-
console.log(` Max concurrent: ${options.maxConcurrent}`);
|
|
206
|
-
|
|
207
|
-
// Start sync
|
|
208
|
-
const startTime = Date.now();
|
|
209
|
-
console.log(`\nš Starting batch sync...${options.dryRun ? ' (DRY RUN)' : ''}\n`);
|
|
210
|
-
|
|
211
|
-
let results;
|
|
212
|
-
|
|
213
|
-
// Sync based on type
|
|
214
|
-
if (options.type === 'all') {
|
|
215
|
-
results = await batchSyncAll({
|
|
216
|
-
basePath: this.basePath,
|
|
217
|
-
owner: repo.owner,
|
|
218
|
-
repo: repo.repo,
|
|
219
|
-
octokit,
|
|
220
|
-
dryRun: options.dryRun,
|
|
221
|
-
maxConcurrent: options.maxConcurrent,
|
|
222
|
-
onProgress: (type, current, total) => {
|
|
223
|
-
this.printProgress(type, current, total);
|
|
224
|
-
}
|
|
225
|
-
});
|
|
226
|
-
} else if (options.type === 'prd') {
|
|
227
|
-
results = await batchSyncPRDs({
|
|
228
|
-
basePath: this.basePath,
|
|
229
|
-
owner: repo.owner,
|
|
230
|
-
repo: repo.repo,
|
|
231
|
-
octokit,
|
|
232
|
-
dryRun: options.dryRun,
|
|
233
|
-
maxConcurrent: options.maxConcurrent,
|
|
234
|
-
onProgress: (current, total) => {
|
|
235
|
-
this.printProgress('prd', current, total);
|
|
236
|
-
}
|
|
237
|
-
});
|
|
238
|
-
} else if (options.type === 'epic') {
|
|
239
|
-
results = await batchSyncEpics({
|
|
240
|
-
basePath: this.basePath,
|
|
241
|
-
owner: repo.owner,
|
|
242
|
-
repo: repo.repo,
|
|
243
|
-
octokit,
|
|
244
|
-
dryRun: options.dryRun,
|
|
245
|
-
maxConcurrent: options.maxConcurrent,
|
|
246
|
-
onProgress: (current, total) => {
|
|
247
|
-
this.printProgress('epic', current, total);
|
|
248
|
-
}
|
|
249
|
-
});
|
|
250
|
-
} else if (options.type === 'task') {
|
|
251
|
-
results = await batchSyncTasks({
|
|
252
|
-
basePath: this.basePath,
|
|
253
|
-
owner: repo.owner,
|
|
254
|
-
repo: repo.repo,
|
|
255
|
-
octokit,
|
|
256
|
-
dryRun: options.dryRun,
|
|
257
|
-
maxConcurrent: options.maxConcurrent,
|
|
258
|
-
onProgress: (current, total) => {
|
|
259
|
-
this.printProgress('task', current, total);
|
|
260
|
-
}
|
|
261
|
-
});
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
const duration = Date.now() - startTime;
|
|
265
|
-
|
|
266
|
-
// Print summary
|
|
267
|
-
console.log('\n' + 'ā'.repeat(50));
|
|
268
|
-
console.log('š Batch Sync Summary');
|
|
269
|
-
console.log('ā'.repeat(50));
|
|
270
|
-
|
|
271
|
-
if (options.type === 'all') {
|
|
272
|
-
console.log(`\nš PRDs: ${results.prds.succeeded}/${results.prds.total} synced`);
|
|
273
|
-
console.log(`š Epics: ${results.epics.succeeded}/${results.epics.total} synced`);
|
|
274
|
-
console.log(`ā
Tasks: ${results.tasks.succeeded}/${results.tasks.total} synced`);
|
|
275
|
-
console.log(`\nš¦ Total: ${results.succeeded}/${results.total} items`);
|
|
276
|
-
|
|
277
|
-
if (results.failed > 0) {
|
|
278
|
-
console.log(`ā Failed: ${results.failed}`);
|
|
279
|
-
}
|
|
280
|
-
} else {
|
|
281
|
-
console.log(`\nā
Succeeded: ${results.succeeded}`);
|
|
282
|
-
console.log(`ā Failed: ${results.failed}`);
|
|
283
|
-
console.log(`š¦ Total: ${results.total}`);
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
console.log(`\nā±ļø Duration: ${this.formatDuration(duration)}`);
|
|
287
|
-
|
|
288
|
-
if (results.rateLimit) {
|
|
289
|
-
console.log(`š Rate limit: ${results.rateLimit.remaining} requests remaining`);
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
// Show errors if any
|
|
293
|
-
if (results.errors && results.errors.length > 0) {
|
|
294
|
-
console.log(`\nā ļø Errors (${results.errors.length}):`);
|
|
295
|
-
results.errors.slice(0, 5).forEach(err => {
|
|
296
|
-
console.log(` ⢠${err.item}: ${err.error}`);
|
|
297
|
-
});
|
|
298
|
-
|
|
299
|
-
if (results.errors.length > 5) {
|
|
300
|
-
console.log(` ... and ${results.errors.length - 5} more`);
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
console.log('\n' + 'ā'.repeat(50));
|
|
305
|
-
|
|
306
|
-
// Exit code based on results
|
|
307
|
-
if (results.failed === 0) {
|
|
308
|
-
console.log('ā
All items synced successfully!');
|
|
309
|
-
process.exit(0);
|
|
310
|
-
} else if (results.succeeded > 0) {
|
|
311
|
-
console.log('ā ļø Partial sync completed (some errors)');
|
|
312
|
-
process.exit(0);
|
|
313
|
-
} else {
|
|
314
|
-
console.log('ā Sync failed');
|
|
315
|
-
process.exit(1);
|
|
316
|
-
}
|
|
317
|
-
|
|
318
|
-
} catch (error) {
|
|
319
|
-
console.error('\nā Error:', error.message);
|
|
320
|
-
|
|
321
|
-
if (error.stack && process.env.DEBUG) {
|
|
322
|
-
console.error('\nStack trace:');
|
|
323
|
-
console.error(error.stack);
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
process.exit(1);
|
|
327
|
-
}
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
// Main execution
|
|
332
|
-
if (require.main === module) {
|
|
333
|
-
const command = new SyncBatchCommand();
|
|
334
|
-
command.run(process.argv.slice(2));
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
module.exports = SyncBatchCommand;
|