light-plan 0.0.0-stage → 0.1.0
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/LICENSE +21 -0
- package/README.md +3181 -2
- package/assets/README.md +111 -0
- package/assets/agents/lpm-developer.md +468 -0
- package/assets/agents/lpm-planner.md +532 -0
- package/assets/harnesses/claude.yml +43 -0
- package/assets/harnesses/copilot.yml +54 -0
- package/assets/harnesses/reasonix.yml +49 -0
- package/assets/hcm/light-plan.yml +45 -0
- package/assets/skills/lpm-board-health.md +243 -0
- package/assets/skills/lpm-board-setup.md +354 -0
- package/assets/skills/lpm-delivery.md +344 -0
- package/assets/skills/lpm-planning.md +411 -0
- package/assets/skills/lpm-templates.md +144 -0
- package/assets/skills/lpm.md +267 -0
- package/dist/cli/agent-view.d.ts +27 -0
- package/dist/cli/agent-view.js +247 -0
- package/dist/cli/agent-view.js.map +1 -0
- package/dist/cli/commands/agent/assets.d.ts +64 -0
- package/dist/cli/commands/agent/assets.js +106 -0
- package/dist/cli/commands/agent/assets.js.map +1 -0
- package/dist/cli/commands/agent/glob.d.ts +25 -0
- package/dist/cli/commands/agent/glob.js +82 -0
- package/dist/cli/commands/agent/glob.js.map +1 -0
- package/dist/cli/commands/agent/index.d.ts +11 -0
- package/dist/cli/commands/agent/index.js +284 -0
- package/dist/cli/commands/agent/index.js.map +1 -0
- package/dist/cli/commands/agent/install.d.ts +59 -0
- package/dist/cli/commands/agent/install.js +131 -0
- package/dist/cli/commands/agent/install.js.map +1 -0
- package/dist/cli/commands/agent/mapping.d.ts +175 -0
- package/dist/cli/commands/agent/mapping.js +256 -0
- package/dist/cli/commands/agent/mapping.js.map +1 -0
- package/dist/cli/commands/check.d.ts +2 -0
- package/dist/cli/commands/check.js +81 -0
- package/dist/cli/commands/check.js.map +1 -0
- package/dist/cli/commands/comment.d.ts +2 -0
- package/dist/cli/commands/comment.js +104 -0
- package/dist/cli/commands/comment.js.map +1 -0
- package/dist/cli/commands/convert.d.ts +2 -0
- package/dist/cli/commands/convert.js +115 -0
- package/dist/cli/commands/convert.js.map +1 -0
- package/dist/cli/commands/copy.d.ts +2 -0
- package/dist/cli/commands/copy.js +69 -0
- package/dist/cli/commands/copy.js.map +1 -0
- package/dist/cli/commands/export.d.ts +11 -0
- package/dist/cli/commands/export.js +226 -0
- package/dist/cli/commands/export.js.map +1 -0
- package/dist/cli/commands/flag.d.ts +2 -0
- package/dist/cli/commands/flag.js +172 -0
- package/dist/cli/commands/flag.js.map +1 -0
- package/dist/cli/commands/git.d.ts +11 -0
- package/dist/cli/commands/git.js +357 -0
- package/dist/cli/commands/git.js.map +1 -0
- package/dist/cli/commands/hcm/bundle.d.ts +60 -0
- package/dist/cli/commands/hcm/bundle.js +166 -0
- package/dist/cli/commands/hcm/bundle.js.map +1 -0
- package/dist/cli/commands/hcm/index.d.ts +11 -0
- package/dist/cli/commands/hcm/index.js +162 -0
- package/dist/cli/commands/hcm/index.js.map +1 -0
- package/dist/cli/commands/init.d.ts +2 -0
- package/dist/cli/commands/init.js +81 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/insert.d.ts +2 -0
- package/dist/cli/commands/insert.js +70 -0
- package/dist/cli/commands/insert.js.map +1 -0
- package/dist/cli/commands/instructions.d.ts +7 -0
- package/dist/cli/commands/instructions.js +256 -0
- package/dist/cli/commands/instructions.js.map +1 -0
- package/dist/cli/commands/link.d.ts +2 -0
- package/dist/cli/commands/link.js +121 -0
- package/dist/cli/commands/link.js.map +1 -0
- package/dist/cli/commands/mcp/config.d.ts +71 -0
- package/dist/cli/commands/mcp/config.js +119 -0
- package/dist/cli/commands/mcp/config.js.map +1 -0
- package/dist/cli/commands/mcp/index.d.ts +9 -0
- package/dist/cli/commands/mcp/index.js +92 -0
- package/dist/cli/commands/mcp/index.js.map +1 -0
- package/dist/cli/commands/mcp/serve.d.ts +1 -0
- package/dist/cli/commands/mcp/serve.js +76 -0
- package/dist/cli/commands/mcp/serve.js.map +1 -0
- package/dist/cli/commands/mcp/setup.d.ts +1 -0
- package/dist/cli/commands/mcp/setup.js +83 -0
- package/dist/cli/commands/mcp/setup.js.map +1 -0
- package/dist/cli/commands/me.d.ts +2 -0
- package/dist/cli/commands/me.js +85 -0
- package/dist/cli/commands/me.js.map +1 -0
- package/dist/cli/commands/move.d.ts +2 -0
- package/dist/cli/commands/move.js +81 -0
- package/dist/cli/commands/move.js.map +1 -0
- package/dist/cli/commands/new.d.ts +2 -0
- package/dist/cli/commands/new.js +222 -0
- package/dist/cli/commands/new.js.map +1 -0
- package/dist/cli/commands/open.d.ts +2 -0
- package/dist/cli/commands/open.js +43 -0
- package/dist/cli/commands/open.js.map +1 -0
- package/dist/cli/commands/period.d.ts +10 -0
- package/dist/cli/commands/period.js +165 -0
- package/dist/cli/commands/period.js.map +1 -0
- package/dist/cli/commands/profile.d.ts +2 -0
- package/dist/cli/commands/profile.js +133 -0
- package/dist/cli/commands/profile.js.map +1 -0
- package/dist/cli/commands/queue.d.ts +2 -0
- package/dist/cli/commands/queue.js +582 -0
- package/dist/cli/commands/queue.js.map +1 -0
- package/dist/cli/commands/remote.d.ts +10 -0
- package/dist/cli/commands/remote.js +3142 -0
- package/dist/cli/commands/remote.js.map +1 -0
- package/dist/cli/commands/rm.d.ts +2 -0
- package/dist/cli/commands/rm.js +63 -0
- package/dist/cli/commands/rm.js.map +1 -0
- package/dist/cli/commands/set.d.ts +2 -0
- package/dist/cli/commands/set.js +139 -0
- package/dist/cli/commands/set.js.map +1 -0
- package/dist/cli/commands/split.d.ts +2 -0
- package/dist/cli/commands/split.js +90 -0
- package/dist/cli/commands/split.js.map +1 -0
- package/dist/cli/commands/task.d.ts +2 -0
- package/dist/cli/commands/task.js +298 -0
- package/dist/cli/commands/task.js.map +1 -0
- package/dist/cli/commands/team.d.ts +2 -0
- package/dist/cli/commands/team.js +114 -0
- package/dist/cli/commands/team.js.map +1 -0
- package/dist/cli/commands/template.d.ts +2 -0
- package/dist/cli/commands/template.js +338 -0
- package/dist/cli/commands/template.js.map +1 -0
- package/dist/cli/commands/ui.d.ts +2 -0
- package/dist/cli/commands/ui.js +98 -0
- package/dist/cli/commands/ui.js.map +1 -0
- package/dist/cli/commands/upstream.d.ts +2 -0
- package/dist/cli/commands/upstream.js +218 -0
- package/dist/cli/commands/upstream.js.map +1 -0
- package/dist/cli/context.d.ts +24 -0
- package/dist/cli/context.js +52 -0
- package/dist/cli/context.js.map +1 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +208 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/live.d.ts +71 -0
- package/dist/cli/live.js +182 -0
- package/dist/cli/live.js.map +1 -0
- package/dist/cli/plan.d.ts +28 -0
- package/dist/cli/plan.js +76 -0
- package/dist/cli/plan.js.map +1 -0
- package/dist/cli/prompt.d.ts +60 -0
- package/dist/cli/prompt.js +185 -0
- package/dist/cli/prompt.js.map +1 -0
- package/dist/cli/ui.d.ts +65 -0
- package/dist/cli/ui.js +79 -0
- package/dist/cli/ui.js.map +1 -0
- package/dist/core/board/dependency-rollup.d.ts +54 -0
- package/dist/core/board/dependency-rollup.js +72 -0
- package/dist/core/board/dependency-rollup.js.map +1 -0
- package/dist/core/board/flag-rollup.d.ts +33 -0
- package/dist/core/board/flag-rollup.js +56 -0
- package/dist/core/board/flag-rollup.js.map +1 -0
- package/dist/core/board/index.d.ts +21 -0
- package/dist/core/board/index.js +22 -0
- package/dist/core/board/index.js.map +1 -0
- package/dist/core/board/load/cache.d.ts +52 -0
- package/dist/core/board/load/cache.js +105 -0
- package/dist/core/board/load/cache.js.map +1 -0
- package/dist/core/board/load/fields.d.ts +33 -0
- package/dist/core/board/load/fields.js +154 -0
- package/dist/core/board/load/fields.js.map +1 -0
- package/dist/core/board/load/scan.d.ts +39 -0
- package/dist/core/board/load/scan.js +88 -0
- package/dist/core/board/load/scan.js.map +1 -0
- package/dist/core/board/load/tree.d.ts +10 -0
- package/dist/core/board/load/tree.js +114 -0
- package/dist/core/board/load/tree.js.map +1 -0
- package/dist/core/board/load.d.ts +69 -0
- package/dist/core/board/load.js +204 -0
- package/dist/core/board/load.js.map +1 -0
- package/dist/core/board/query.d.ts +126 -0
- package/dist/core/board/query.js +291 -0
- package/dist/core/board/query.js.map +1 -0
- package/dist/core/board/registry.d.ts +51 -0
- package/dist/core/board/registry.js +98 -0
- package/dist/core/board/registry.js.map +1 -0
- package/dist/core/board/remote-scopes.d.ts +71 -0
- package/dist/core/board/remote-scopes.js +103 -0
- package/dist/core/board/remote-scopes.js.map +1 -0
- package/dist/core/board/rollup.d.ts +32 -0
- package/dist/core/board/rollup.js +67 -0
- package/dist/core/board/rollup.js.map +1 -0
- package/dist/core/board/scope.d.ts +81 -0
- package/dist/core/board/scope.js +134 -0
- package/dist/core/board/scope.js.map +1 -0
- package/dist/core/board/simulate.d.ts +138 -0
- package/dist/core/board/simulate.js +141 -0
- package/dist/core/board/simulate.js.map +1 -0
- package/dist/core/board/tasks/index.d.ts +25 -0
- package/dist/core/board/tasks/index.js +26 -0
- package/dist/core/board/tasks/index.js.map +1 -0
- package/dist/core/board/tasks/ranking.d.ts +155 -0
- package/dist/core/board/tasks/ranking.js +374 -0
- package/dist/core/board/tasks/ranking.js.map +1 -0
- package/dist/core/board/tasks/roster.d.ts +42 -0
- package/dist/core/board/tasks/roster.js +82 -0
- package/dist/core/board/tasks/roster.js.map +1 -0
- package/dist/core/board/tasks.d.ts +1 -0
- package/dist/core/board/tasks.js +2 -0
- package/dist/core/board/tasks.js.map +1 -0
- package/dist/core/config/index.d.ts +9 -0
- package/dist/core/config/index.js +10 -0
- package/dist/core/config/index.js.map +1 -0
- package/dist/core/config/lookup.d.ts +114 -0
- package/dist/core/config/lookup.js +221 -0
- package/dist/core/config/lookup.js.map +1 -0
- package/dist/core/config/remote-blocks.d.ts +17 -0
- package/dist/core/config/remote-blocks.js +47 -0
- package/dist/core/config/remote-blocks.js.map +1 -0
- package/dist/core/config/schema.d.ts +10 -0
- package/dist/core/config/schema.js +451 -0
- package/dist/core/config/schema.js.map +1 -0
- package/dist/core/errors.d.ts +23 -0
- package/dist/core/errors.js +31 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/gitsync/hosts.d.ts +40 -0
- package/dist/core/gitsync/hosts.js +115 -0
- package/dist/core/gitsync/hosts.js.map +1 -0
- package/dist/core/gitsync/index.d.ts +25 -0
- package/dist/core/gitsync/index.js +25 -0
- package/dist/core/gitsync/index.js.map +1 -0
- package/dist/core/gitsync/integrate.d.ts +72 -0
- package/dist/core/gitsync/integrate.js +115 -0
- package/dist/core/gitsync/integrate.js.map +1 -0
- package/dist/core/gitsync/repo.d.ts +61 -0
- package/dist/core/gitsync/repo.js +213 -0
- package/dist/core/gitsync/repo.js.map +1 -0
- package/dist/core/gitsync/run.d.ts +58 -0
- package/dist/core/gitsync/run.js +102 -0
- package/dist/core/gitsync/run.js.map +1 -0
- package/dist/core/gitsync/status.d.ts +59 -0
- package/dist/core/gitsync/status.js +81 -0
- package/dist/core/gitsync/status.js.map +1 -0
- package/dist/core/gitsync/sync.d.ts +111 -0
- package/dist/core/gitsync/sync.js +275 -0
- package/dist/core/gitsync/sync.js.map +1 -0
- package/dist/core/index.d.ts +31 -0
- package/dist/core/index.js +32 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/instructions/analyze.d.ts +70 -0
- package/dist/core/instructions/analyze.js +275 -0
- package/dist/core/instructions/analyze.js.map +1 -0
- package/dist/core/instructions/builtin.d.ts +21 -0
- package/dist/core/instructions/builtin.js +133 -0
- package/dist/core/instructions/builtin.js.map +1 -0
- package/dist/core/instructions/context.d.ts +155 -0
- package/dist/core/instructions/context.js +209 -0
- package/dist/core/instructions/context.js.map +1 -0
- package/dist/core/instructions/index.d.ts +29 -0
- package/dist/core/instructions/index.js +30 -0
- package/dist/core/instructions/index.js.map +1 -0
- package/dist/core/instructions/instructions.d.ts +90 -0
- package/dist/core/instructions/instructions.js +179 -0
- package/dist/core/instructions/instructions.js.map +1 -0
- package/dist/core/instructions/template.d.ts +108 -0
- package/dist/core/instructions/template.js +252 -0
- package/dist/core/instructions/template.js.map +1 -0
- package/dist/core/model/attributes.d.ts +16 -0
- package/dist/core/model/attributes.js +119 -0
- package/dist/core/model/attributes.js.map +1 -0
- package/dist/core/model/index.d.ts +10 -0
- package/dist/core/model/index.js +11 -0
- package/dist/core/model/index.js.map +1 -0
- package/dist/core/model/links.d.ts +34 -0
- package/dist/core/model/links.js +114 -0
- package/dist/core/model/links.js.map +1 -0
- package/dist/core/model/profile.d.ts +31 -0
- package/dist/core/model/profile.js +8 -0
- package/dist/core/model/profile.js.map +1 -0
- package/dist/core/model/types.d.ts +441 -0
- package/dist/core/model/types.js +167 -0
- package/dist/core/model/types.js.map +1 -0
- package/dist/core/model/zod.d.ts +6 -0
- package/dist/core/model/zod.js +11 -0
- package/dist/core/model/zod.js.map +1 -0
- package/dist/core/operations/board-index.d.ts +45 -0
- package/dist/core/operations/board-index.js +147 -0
- package/dist/core/operations/board-index.js.map +1 -0
- package/dist/core/operations/claim.d.ts +69 -0
- package/dist/core/operations/claim.js +115 -0
- package/dist/core/operations/claim.js.map +1 -0
- package/dist/core/operations/comment.d.ts +30 -0
- package/dist/core/operations/comment.js +46 -0
- package/dist/core/operations/comment.js.map +1 -0
- package/dist/core/operations/create.d.ts +82 -0
- package/dist/core/operations/create.js +306 -0
- package/dist/core/operations/create.js.map +1 -0
- package/dist/core/operations/flag.d.ts +58 -0
- package/dist/core/operations/flag.js +95 -0
- package/dist/core/operations/flag.js.map +1 -0
- package/dist/core/operations/git-sync.d.ts +148 -0
- package/dist/core/operations/git-sync.js +341 -0
- package/dist/core/operations/git-sync.js.map +1 -0
- package/dist/core/operations/index.d.ts +44 -0
- package/dist/core/operations/index.js +45 -0
- package/dist/core/operations/index.js.map +1 -0
- package/dist/core/operations/init.d.ts +25 -0
- package/dist/core/operations/init.js +122 -0
- package/dist/core/operations/init.js.map +1 -0
- package/dist/core/operations/link.d.ts +40 -0
- package/dist/core/operations/link.js +131 -0
- package/dist/core/operations/link.js.map +1 -0
- package/dist/core/operations/move.d.ts +43 -0
- package/dist/core/operations/move.js +103 -0
- package/dist/core/operations/move.js.map +1 -0
- package/dist/core/operations/profile.d.ts +23 -0
- package/dist/core/operations/profile.js +26 -0
- package/dist/core/operations/profile.js.map +1 -0
- package/dist/core/operations/remotes-off.d.ts +12 -0
- package/dist/core/operations/remotes-off.js +67 -0
- package/dist/core/operations/remotes-off.js.map +1 -0
- package/dist/core/operations/remove.d.ts +18 -0
- package/dist/core/operations/remove.js +114 -0
- package/dist/core/operations/remove.js.map +1 -0
- package/dist/core/operations/retype.d.ts +25 -0
- package/dist/core/operations/retype.js +59 -0
- package/dist/core/operations/retype.js.map +1 -0
- package/dist/core/operations/rollup.d.ts +74 -0
- package/dist/core/operations/rollup.js +121 -0
- package/dist/core/operations/rollup.js.map +1 -0
- package/dist/core/operations/shared.d.ts +133 -0
- package/dist/core/operations/shared.js +383 -0
- package/dist/core/operations/shared.js.map +1 -0
- package/dist/core/operations/update.d.ts +43 -0
- package/dist/core/operations/update.js +161 -0
- package/dist/core/operations/update.js.map +1 -0
- package/dist/core/operations/user.d.ts +27 -0
- package/dist/core/operations/user.js +68 -0
- package/dist/core/operations/user.js.map +1 -0
- package/dist/core/profile/current.d.ts +35 -0
- package/dist/core/profile/current.js +31 -0
- package/dist/core/profile/current.js.map +1 -0
- package/dist/core/profile/index.d.ts +14 -0
- package/dist/core/profile/index.js +15 -0
- package/dist/core/profile/index.js.map +1 -0
- package/dist/core/profile/schema.d.ts +9 -0
- package/dist/core/profile/schema.js +100 -0
- package/dist/core/profile/schema.js.map +1 -0
- package/dist/core/storage/activity.d.ts +78 -0
- package/dist/core/storage/activity.js +131 -0
- package/dist/core/storage/activity.js.map +1 -0
- package/dist/core/storage/atomic.d.ts +34 -0
- package/dist/core/storage/atomic.js +117 -0
- package/dist/core/storage/atomic.js.map +1 -0
- package/dist/core/storage/comments.d.ts +39 -0
- package/dist/core/storage/comments.js +88 -0
- package/dist/core/storage/comments.js.map +1 -0
- package/dist/core/storage/document.d.ts +16 -0
- package/dist/core/storage/document.js +98 -0
- package/dist/core/storage/document.js.map +1 -0
- package/dist/core/storage/frontmatter.d.ts +16 -0
- package/dist/core/storage/frontmatter.js +33 -0
- package/dist/core/storage/frontmatter.js.map +1 -0
- package/dist/core/storage/git.d.ts +8 -0
- package/dist/core/storage/git.js +48 -0
- package/dist/core/storage/git.js.map +1 -0
- package/dist/core/storage/index.d.ts +27 -0
- package/dist/core/storage/index.js +28 -0
- package/dist/core/storage/index.js.map +1 -0
- package/dist/core/storage/local.d.ts +57 -0
- package/dist/core/storage/local.js +133 -0
- package/dist/core/storage/local.js.map +1 -0
- package/dist/core/storage/lock.d.ts +85 -0
- package/dist/core/storage/lock.js +364 -0
- package/dist/core/storage/lock.js.map +1 -0
- package/dist/core/storage/paths.d.ts +125 -0
- package/dist/core/storage/paths.js +202 -0
- package/dist/core/storage/paths.js.map +1 -0
- package/dist/core/storage/state.d.ts +32 -0
- package/dist/core/storage/state.js +71 -0
- package/dist/core/storage/state.js.map +1 -0
- package/dist/core/storage/templates.d.ts +29 -0
- package/dist/core/storage/templates.js +62 -0
- package/dist/core/storage/templates.js.map +1 -0
- package/dist/core/storage/views.d.ts +18 -0
- package/dist/core/storage/views.js +62 -0
- package/dist/core/storage/views.js.map +1 -0
- package/dist/core/validation/check.d.ts +4 -0
- package/dist/core/validation/check.js +22 -0
- package/dist/core/validation/check.js.map +1 -0
- package/dist/core/validation/checks/collection.d.ts +4 -0
- package/dist/core/validation/checks/collection.js +152 -0
- package/dist/core/validation/checks/collection.js.map +1 -0
- package/dist/core/validation/checks/counters.d.ts +3 -0
- package/dist/core/validation/checks/counters.js +23 -0
- package/dist/core/validation/checks/counters.js.map +1 -0
- package/dist/core/validation/checks/dependencies.d.ts +3 -0
- package/dist/core/validation/checks/dependencies.js +58 -0
- package/dist/core/validation/checks/dependencies.js.map +1 -0
- package/dist/core/validation/checks/gitignore.d.ts +10 -0
- package/dist/core/validation/checks/gitignore.js +22 -0
- package/dist/core/validation/checks/gitignore.js.map +1 -0
- package/dist/core/validation/checks/index-file.d.ts +8 -0
- package/dist/core/validation/checks/index-file.js +26 -0
- package/dist/core/validation/checks/index-file.js.map +1 -0
- package/dist/core/validation/checks/index.d.ts +20 -0
- package/dist/core/validation/checks/index.js +21 -0
- package/dist/core/validation/checks/index.js.map +1 -0
- package/dist/core/validation/checks/issues.d.ts +3 -0
- package/dist/core/validation/checks/issues.js +152 -0
- package/dist/core/validation/checks/issues.js.map +1 -0
- package/dist/core/validation/checks/periods.d.ts +3 -0
- package/dist/core/validation/checks/periods.js +89 -0
- package/dist/core/validation/checks/periods.js.map +1 -0
- package/dist/core/validation/checks/remotes.d.ts +20 -0
- package/dist/core/validation/checks/remotes.js +42 -0
- package/dist/core/validation/checks/remotes.js.map +1 -0
- package/dist/core/validation/checks/resources.d.ts +3 -0
- package/dist/core/validation/checks/resources.js +77 -0
- package/dist/core/validation/checks/resources.js.map +1 -0
- package/dist/core/validation/checks/rollup.d.ts +27 -0
- package/dist/core/validation/checks/rollup.js +53 -0
- package/dist/core/validation/checks/rollup.js.map +1 -0
- package/dist/core/validation/checks/squads.d.ts +3 -0
- package/dist/core/validation/checks/squads.js +42 -0
- package/dist/core/validation/checks/squads.js.map +1 -0
- package/dist/core/validation/checks/templates.d.ts +14 -0
- package/dist/core/validation/checks/templates.js +119 -0
- package/dist/core/validation/checks/templates.js.map +1 -0
- package/dist/core/validation/fix.d.ts +7 -0
- package/dist/core/validation/fix.js +273 -0
- package/dist/core/validation/fix.js.map +1 -0
- package/dist/core/validation/index.d.ts +7 -0
- package/dist/core/validation/index.js +8 -0
- package/dist/core/validation/index.js.map +1 -0
- package/dist/core/validation/shared.d.ts +47 -0
- package/dist/core/validation/shared.js +66 -0
- package/dist/core/validation/shared.js.map +1 -0
- package/dist/mcp/context.d.ts +70 -0
- package/dist/mcp/context.js +110 -0
- package/dist/mcp/context.js.map +1 -0
- package/dist/mcp/index.d.ts +49 -0
- package/dist/mcp/index.js +90 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/reply.d.ts +28 -0
- package/dist/mcp/reply.js +34 -0
- package/dist/mcp/reply.js.map +1 -0
- package/dist/mcp/tools/plan/create.d.ts +3 -0
- package/dist/mcp/tools/plan/create.js +128 -0
- package/dist/mcp/tools/plan/create.js.map +1 -0
- package/dist/mcp/tools/plan/delete.d.ts +3 -0
- package/dist/mcp/tools/plan/delete.js +35 -0
- package/dist/mcp/tools/plan/delete.js.map +1 -0
- package/dist/mcp/tools/plan/graph.d.ts +3 -0
- package/dist/mcp/tools/plan/graph.js +53 -0
- package/dist/mcp/tools/plan/graph.js.map +1 -0
- package/dist/mcp/tools/plan/index.d.ts +15 -0
- package/dist/mcp/tools/plan/index.js +16 -0
- package/dist/mcp/tools/plan/index.js.map +1 -0
- package/dist/mcp/tools/plan/link.d.ts +3 -0
- package/dist/mcp/tools/plan/link.js +46 -0
- package/dist/mcp/tools/plan/link.js.map +1 -0
- package/dist/mcp/tools/plan/registrar.d.ts +10 -0
- package/dist/mcp/tools/plan/registrar.js +24 -0
- package/dist/mcp/tools/plan/registrar.js.map +1 -0
- package/dist/mcp/tools/plan/reshape.d.ts +3 -0
- package/dist/mcp/tools/plan/reshape.js +95 -0
- package/dist/mcp/tools/plan/reshape.js.map +1 -0
- package/dist/mcp/tools/plan/timeline.d.ts +3 -0
- package/dist/mcp/tools/plan/timeline.js +68 -0
- package/dist/mcp/tools/plan/timeline.js.map +1 -0
- package/dist/mcp/tools/plan/upstream.d.ts +14 -0
- package/dist/mcp/tools/plan/upstream.js +69 -0
- package/dist/mcp/tools/plan/upstream.js.map +1 -0
- package/dist/mcp/tools/plan.d.ts +1 -0
- package/dist/mcp/tools/plan.js +2 -0
- package/dist/mcp/tools/plan.js.map +1 -0
- package/dist/mcp/tools/read.d.ts +3 -0
- package/dist/mcp/tools/read.js +339 -0
- package/dist/mcp/tools/read.js.map +1 -0
- package/dist/mcp/tools/remote.d.ts +3 -0
- package/dist/mcp/tools/remote.js +254 -0
- package/dist/mcp/tools/remote.js.map +1 -0
- package/dist/mcp/tools/templates.d.ts +12 -0
- package/dist/mcp/tools/templates.js +165 -0
- package/dist/mcp/tools/templates.js.map +1 -0
- package/dist/mcp/tools/work.d.ts +16 -0
- package/dist/mcp/tools/work.js +359 -0
- package/dist/mcp/tools/work.js.map +1 -0
- package/dist/remote/accounts.d.ts +158 -0
- package/dist/remote/accounts.js +207 -0
- package/dist/remote/accounts.js.map +1 -0
- package/dist/remote/adopt.d.ts +139 -0
- package/dist/remote/adopt.js +181 -0
- package/dist/remote/adopt.js.map +1 -0
- package/dist/remote/anchor.d.ts +35 -0
- package/dist/remote/anchor.js +53 -0
- package/dist/remote/anchor.js.map +1 -0
- package/dist/remote/attributes.d.ts +103 -0
- package/dist/remote/attributes.js +245 -0
- package/dist/remote/attributes.js.map +1 -0
- package/dist/remote/audit.d.ts +112 -0
- package/dist/remote/audit.js +215 -0
- package/dist/remote/audit.js.map +1 -0
- package/dist/remote/capabilities.d.ts +267 -0
- package/dist/remote/capabilities.js +225 -0
- package/dist/remote/capabilities.js.map +1 -0
- package/dist/remote/check.d.ts +49 -0
- package/dist/remote/check.js +356 -0
- package/dist/remote/check.js.map +1 -0
- package/dist/remote/comments.d.ts +86 -0
- package/dist/remote/comments.js +87 -0
- package/dist/remote/comments.js.map +1 -0
- package/dist/remote/config-file.d.ts +237 -0
- package/dist/remote/config-file.js +640 -0
- package/dist/remote/config-file.js.map +1 -0
- package/dist/remote/conflicts.d.ts +110 -0
- package/dist/remote/conflicts.js +188 -0
- package/dist/remote/conflicts.js.map +1 -0
- package/dist/remote/connection-catalogue.d.ts +65 -0
- package/dist/remote/connection-catalogue.js +66 -0
- package/dist/remote/connection-catalogue.js.map +1 -0
- package/dist/remote/connection.d.ts +84 -0
- package/dist/remote/connection.js +229 -0
- package/dist/remote/connection.js.map +1 -0
- package/dist/remote/coverage.d.ts +65 -0
- package/dist/remote/coverage.js +244 -0
- package/dist/remote/coverage.js.map +1 -0
- package/dist/remote/credentials.d.ts +95 -0
- package/dist/remote/credentials.js +210 -0
- package/dist/remote/credentials.js.map +1 -0
- package/dist/remote/execute.d.ts +178 -0
- package/dist/remote/execute.js +1245 -0
- package/dist/remote/execute.js.map +1 -0
- package/dist/remote/fingerprint.d.ts +172 -0
- package/dist/remote/fingerprint.js +337 -0
- package/dist/remote/fingerprint.js.map +1 -0
- package/dist/remote/fixtures.d.ts +176 -0
- package/dist/remote/fixtures.js +432 -0
- package/dist/remote/fixtures.js.map +1 -0
- package/dist/remote/guard.d.ts +90 -0
- package/dist/remote/guard.js +83 -0
- package/dist/remote/guard.js.map +1 -0
- package/dist/remote/hierarchy.d.ts +141 -0
- package/dist/remote/hierarchy.js +129 -0
- package/dist/remote/hierarchy.js.map +1 -0
- package/dist/remote/index.d.ts +145 -0
- package/dist/remote/index.js +146 -0
- package/dist/remote/index.js.map +1 -0
- package/dist/remote/inspect.d.ts +103 -0
- package/dist/remote/inspect.js +152 -0
- package/dist/remote/inspect.js.map +1 -0
- package/dist/remote/labels.d.ts +75 -0
- package/dist/remote/labels.js +137 -0
- package/dist/remote/labels.js.map +1 -0
- package/dist/remote/ladder.d.ts +145 -0
- package/dist/remote/ladder.js +387 -0
- package/dist/remote/ladder.js.map +1 -0
- package/dist/remote/ledger.d.ts +97 -0
- package/dist/remote/ledger.js +148 -0
- package/dist/remote/ledger.js.map +1 -0
- package/dist/remote/lifecycle.d.ts +175 -0
- package/dist/remote/lifecycle.js +274 -0
- package/dist/remote/lifecycle.js.map +1 -0
- package/dist/remote/links.d.ts +411 -0
- package/dist/remote/links.js +748 -0
- package/dist/remote/links.js.map +1 -0
- package/dist/remote/managed-block.d.ts +182 -0
- package/dist/remote/managed-block.js +406 -0
- package/dist/remote/managed-block.js.map +1 -0
- package/dist/remote/managed-comment.d.ts +104 -0
- package/dist/remote/managed-comment.js +92 -0
- package/dist/remote/managed-comment.js.map +1 -0
- package/dist/remote/mapping.d.ts +282 -0
- package/dist/remote/mapping.js +336 -0
- package/dist/remote/mapping.js.map +1 -0
- package/dist/remote/merge.d.ts +172 -0
- package/dist/remote/merge.js +221 -0
- package/dist/remote/merge.js.map +1 -0
- package/dist/remote/periods.d.ts +209 -0
- package/dist/remote/periods.js +224 -0
- package/dist/remote/periods.js.map +1 -0
- package/dist/remote/plan.d.ts +671 -0
- package/dist/remote/plan.js +1210 -0
- package/dist/remote/plan.js.map +1 -0
- package/dist/remote/policy.d.ts +67 -0
- package/dist/remote/policy.js +67 -0
- package/dist/remote/policy.js.map +1 -0
- package/dist/remote/preflight.d.ts +112 -0
- package/dist/remote/preflight.js +342 -0
- package/dist/remote/preflight.js.map +1 -0
- package/dist/remote/prerequisites.d.ts +113 -0
- package/dist/remote/prerequisites.js +161 -0
- package/dist/remote/prerequisites.js.map +1 -0
- package/dist/remote/provider.d.ts +802 -0
- package/dist/remote/provider.js +27 -0
- package/dist/remote/provider.js.map +1 -0
- package/dist/remote/providers/github/config.d.ts +84 -0
- package/dist/remote/providers/github/config.js +161 -0
- package/dist/remote/providers/github/config.js.map +1 -0
- package/dist/remote/providers/github/connector.d.ts +33 -0
- package/dist/remote/providers/github/connector.js +774 -0
- package/dist/remote/providers/github/connector.js.map +1 -0
- package/dist/remote/providers/github/edges.d.ts +29 -0
- package/dist/remote/providers/github/edges.js +56 -0
- package/dist/remote/providers/github/edges.js.map +1 -0
- package/dist/remote/providers/github/hierarchy.d.ts +21 -0
- package/dist/remote/providers/github/hierarchy.js +46 -0
- package/dist/remote/providers/github/hierarchy.js.map +1 -0
- package/dist/remote/providers/github/index.d.ts +26 -0
- package/dist/remote/providers/github/index.js +69 -0
- package/dist/remote/providers/github/index.js.map +1 -0
- package/dist/remote/providers/github/project-iteration.d.ts +71 -0
- package/dist/remote/providers/github/project-iteration.js +203 -0
- package/dist/remote/providers/github/project-iteration.js.map +1 -0
- package/dist/remote/providers/github/project-provision.d.ts +130 -0
- package/dist/remote/providers/github/project-provision.js +247 -0
- package/dist/remote/providers/github/project-provision.js.map +1 -0
- package/dist/remote/providers/github/project-status.d.ts +115 -0
- package/dist/remote/providers/github/project-status.js +317 -0
- package/dist/remote/providers/github/project-status.js.map +1 -0
- package/dist/remote/providers/github/projects.d.ts +181 -0
- package/dist/remote/providers/github/projects.js +481 -0
- package/dist/remote/providers/github/projects.js.map +1 -0
- package/dist/remote/providers/github/translator.d.ts +103 -0
- package/dist/remote/providers/github/translator.js +400 -0
- package/dist/remote/providers/github/translator.js.map +1 -0
- package/dist/remote/providers/jira/config.d.ts +96 -0
- package/dist/remote/providers/jira/config.js +200 -0
- package/dist/remote/providers/jira/config.js.map +1 -0
- package/dist/remote/providers/jira/connector.d.ts +42 -0
- package/dist/remote/providers/jira/connector.js +1688 -0
- package/dist/remote/providers/jira/connector.js.map +1 -0
- package/dist/remote/providers/jira/fields.d.ts +292 -0
- package/dist/remote/providers/jira/fields.js +463 -0
- package/dist/remote/providers/jira/fields.js.map +1 -0
- package/dist/remote/providers/jira/hierarchy.d.ts +28 -0
- package/dist/remote/providers/jira/hierarchy.js +60 -0
- package/dist/remote/providers/jira/hierarchy.js.map +1 -0
- package/dist/remote/providers/jira/index.d.ts +29 -0
- package/dist/remote/providers/jira/index.js +100 -0
- package/dist/remote/providers/jira/index.js.map +1 -0
- package/dist/remote/providers/jira/links.d.ts +41 -0
- package/dist/remote/providers/jira/links.js +102 -0
- package/dist/remote/providers/jira/links.js.map +1 -0
- package/dist/remote/providers/jira/sprints.d.ts +80 -0
- package/dist/remote/providers/jira/sprints.js +107 -0
- package/dist/remote/providers/jira/sprints.js.map +1 -0
- package/dist/remote/providers/jira/translator.d.ts +61 -0
- package/dist/remote/providers/jira/translator.js +382 -0
- package/dist/remote/providers/jira/translator.js.map +1 -0
- package/dist/remote/providers/jira/types.d.ts +112 -0
- package/dist/remote/providers/jira/types.js +160 -0
- package/dist/remote/providers/jira/types.js.map +1 -0
- package/dist/remote/providers/jira/vocabulary.d.ts +55 -0
- package/dist/remote/providers/jira/vocabulary.js +91 -0
- package/dist/remote/providers/jira/vocabulary.js.map +1 -0
- package/dist/remote/providers/jsonfile/config.d.ts +61 -0
- package/dist/remote/providers/jsonfile/config.js +83 -0
- package/dist/remote/providers/jsonfile/config.js.map +1 -0
- package/dist/remote/providers/jsonfile/connector.d.ts +34 -0
- package/dist/remote/providers/jsonfile/connector.js +251 -0
- package/dist/remote/providers/jsonfile/connector.js.map +1 -0
- package/dist/remote/providers/jsonfile/index.d.ts +38 -0
- package/dist/remote/providers/jsonfile/index.js +90 -0
- package/dist/remote/providers/jsonfile/index.js.map +1 -0
- package/dist/remote/providers/jsonfile/store.d.ts +59 -0
- package/dist/remote/providers/jsonfile/store.js +48 -0
- package/dist/remote/providers/jsonfile/store.js.map +1 -0
- package/dist/remote/providers/jsonfile/translator.d.ts +54 -0
- package/dist/remote/providers/jsonfile/translator.js +199 -0
- package/dist/remote/providers/jsonfile/translator.js.map +1 -0
- package/dist/remote/providers/linear/config.d.ts +83 -0
- package/dist/remote/providers/linear/config.js +140 -0
- package/dist/remote/providers/linear/config.js.map +1 -0
- package/dist/remote/providers/linear/connector.d.ts +36 -0
- package/dist/remote/providers/linear/connector.js +438 -0
- package/dist/remote/providers/linear/connector.js.map +1 -0
- package/dist/remote/providers/linear/estimate.d.ts +63 -0
- package/dist/remote/providers/linear/estimate.js +112 -0
- package/dist/remote/providers/linear/estimate.js.map +1 -0
- package/dist/remote/providers/linear/index.d.ts +31 -0
- package/dist/remote/providers/linear/index.js +75 -0
- package/dist/remote/providers/linear/index.js.map +1 -0
- package/dist/remote/providers/linear/labels.d.ts +51 -0
- package/dist/remote/providers/linear/labels.js +129 -0
- package/dist/remote/providers/linear/labels.js.map +1 -0
- package/dist/remote/providers/linear/states.d.ts +97 -0
- package/dist/remote/providers/linear/states.js +124 -0
- package/dist/remote/providers/linear/states.js.map +1 -0
- package/dist/remote/providers/linear/translator.d.ts +48 -0
- package/dist/remote/providers/linear/translator.js +343 -0
- package/dist/remote/providers/linear/translator.js.map +1 -0
- package/dist/remote/providers/linear/vocabulary.d.ts +27 -0
- package/dist/remote/providers/linear/vocabulary.js +42 -0
- package/dist/remote/providers/linear/vocabulary.js.map +1 -0
- package/dist/remote/provision.d.ts +45 -0
- package/dist/remote/provision.js +81 -0
- package/dist/remote/provision.js.map +1 -0
- package/dist/remote/pull.d.ts +52 -0
- package/dist/remote/pull.js +116 -0
- package/dist/remote/pull.js.map +1 -0
- package/dist/remote/readiness.d.ts +67 -0
- package/dist/remote/readiness.js +336 -0
- package/dist/remote/readiness.js.map +1 -0
- package/dist/remote/rebase.d.ts +157 -0
- package/dist/remote/rebase.js +255 -0
- package/dist/remote/rebase.js.map +1 -0
- package/dist/remote/reconcile.d.ts +115 -0
- package/dist/remote/reconcile.js +140 -0
- package/dist/remote/reconcile.js.map +1 -0
- package/dist/remote/redact.d.ts +70 -0
- package/dist/remote/redact.js +132 -0
- package/dist/remote/redact.js.map +1 -0
- package/dist/remote/registry.d.ts +32 -0
- package/dist/remote/registry.js +54 -0
- package/dist/remote/registry.js.map +1 -0
- package/dist/remote/remotes.d.ts +94 -0
- package/dist/remote/remotes.js +182 -0
- package/dist/remote/remotes.js.map +1 -0
- package/dist/remote/render.d.ts +147 -0
- package/dist/remote/render.js +683 -0
- package/dist/remote/render.js.map +1 -0
- package/dist/remote/report.d.ts +63 -0
- package/dist/remote/report.js +345 -0
- package/dist/remote/report.js.map +1 -0
- package/dist/remote/resolutions.d.ts +115 -0
- package/dist/remote/resolutions.js +217 -0
- package/dist/remote/resolutions.js.map +1 -0
- package/dist/remote/scaffold.d.ts +134 -0
- package/dist/remote/scaffold.js +370 -0
- package/dist/remote/scaffold.js.map +1 -0
- package/dist/remote/scope.d.ts +57 -0
- package/dist/remote/scope.js +91 -0
- package/dist/remote/scope.js.map +1 -0
- package/dist/remote/selection.d.ts +38 -0
- package/dist/remote/selection.js +50 -0
- package/dist/remote/selection.js.map +1 -0
- package/dist/remote/shape.d.ts +141 -0
- package/dist/remote/shape.js +220 -0
- package/dist/remote/shape.js.map +1 -0
- package/dist/remote/status.d.ts +104 -0
- package/dist/remote/status.js +238 -0
- package/dist/remote/status.js.map +1 -0
- package/dist/remote/sync.d.ts +182 -0
- package/dist/remote/sync.js +523 -0
- package/dist/remote/sync.js.map +1 -0
- package/dist/remote/transport/budget.d.ts +48 -0
- package/dist/remote/transport/budget.js +68 -0
- package/dist/remote/transport/budget.js.map +1 -0
- package/dist/remote/transport/connector.d.ts +115 -0
- package/dist/remote/transport/connector.js +21 -0
- package/dist/remote/transport/connector.js.map +1 -0
- package/dist/remote/transport/error.d.ts +88 -0
- package/dist/remote/transport/error.js +196 -0
- package/dist/remote/transport/error.js.map +1 -0
- package/dist/remote/transport/gh.d.ts +20 -0
- package/dist/remote/transport/gh.js +41 -0
- package/dist/remote/transport/gh.js.map +1 -0
- package/dist/remote/transport/graphql.d.ts +25 -0
- package/dist/remote/transport/graphql.js +81 -0
- package/dist/remote/transport/graphql.js.map +1 -0
- package/dist/remote/transport/http.d.ts +47 -0
- package/dist/remote/transport/http.js +195 -0
- package/dist/remote/transport/http.js.map +1 -0
- package/dist/remote/transport/index.d.ts +18 -0
- package/dist/remote/transport/index.js +19 -0
- package/dist/remote/transport/index.js.map +1 -0
- package/dist/remote/transport/process.d.ts +39 -0
- package/dist/remote/transport/process.js +121 -0
- package/dist/remote/transport/process.js.map +1 -0
- package/dist/remote/transport/rest.d.ts +22 -0
- package/dist/remote/transport/rest.js +57 -0
- package/dist/remote/transport/rest.js.map +1 -0
- package/dist/remote/transport/retry.d.ts +91 -0
- package/dist/remote/transport/retry.js +138 -0
- package/dist/remote/transport/retry.js.map +1 -0
- package/dist/remote/transport-error.d.ts +19 -0
- package/dist/remote/transport-error.js +22 -0
- package/dist/remote/transport-error.js.map +1 -0
- package/dist/remote/vocabulary.d.ts +126 -0
- package/dist/remote/vocabulary.js +57 -0
- package/dist/remote/vocabulary.js.map +1 -0
- package/dist/runner/config.d.ts +7 -0
- package/dist/runner/config.js +61 -0
- package/dist/runner/config.js.map +1 -0
- package/dist/runner/git.d.ts +19 -0
- package/dist/runner/git.js +26 -0
- package/dist/runner/git.js.map +1 -0
- package/dist/runner/index.d.ts +20 -0
- package/dist/runner/index.js +21 -0
- package/dist/runner/index.js.map +1 -0
- package/dist/runner/loop.d.ts +46 -0
- package/dist/runner/loop.js +243 -0
- package/dist/runner/loop.js.map +1 -0
- package/dist/runner/pi.d.ts +39 -0
- package/dist/runner/pi.js +276 -0
- package/dist/runner/pi.js.map +1 -0
- package/dist/runner/shell.d.ts +44 -0
- package/dist/runner/shell.js +174 -0
- package/dist/runner/shell.js.map +1 -0
- package/dist/runner/stats.d.ts +19 -0
- package/dist/runner/stats.js +58 -0
- package/dist/runner/stats.js.map +1 -0
- package/dist/runner/types.d.ts +218 -0
- package/dist/runner/types.js +37 -0
- package/dist/runner/types.js.map +1 -0
- package/dist/server/git.d.ts +8 -0
- package/dist/server/git.js +50 -0
- package/dist/server/git.js.map +1 -0
- package/dist/server/http/respond.d.ts +13 -0
- package/dist/server/http/respond.js +59 -0
- package/dist/server/http/respond.js.map +1 -0
- package/dist/server/http/router.d.ts +27 -0
- package/dist/server/http/router.js +48 -0
- package/dist/server/http/router.js.map +1 -0
- package/dist/server/http/static.d.ts +14 -0
- package/dist/server/http/static.js +55 -0
- package/dist/server/http/static.js.map +1 -0
- package/dist/server/index.d.ts +58 -0
- package/dist/server/index.js +124 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/routes/board.d.ts +8 -0
- package/dist/server/routes/board.js +19 -0
- package/dist/server/routes/board.js.map +1 -0
- package/dist/server/routes/comments.d.ts +13 -0
- package/dist/server/routes/comments.js +36 -0
- package/dist/server/routes/comments.js.map +1 -0
- package/dist/server/routes/flags.d.ts +16 -0
- package/dist/server/routes/flags.js +37 -0
- package/dist/server/routes/flags.js.map +1 -0
- package/dist/server/routes/git.d.ts +13 -0
- package/dist/server/routes/git.js +84 -0
- package/dist/server/routes/git.js.map +1 -0
- package/dist/server/routes/remotes.d.ts +36 -0
- package/dist/server/routes/remotes.js +749 -0
- package/dist/server/routes/remotes.js.map +1 -0
- package/dist/server/routes/views.d.ts +10 -0
- package/dist/server/routes/views.js +63 -0
- package/dist/server/routes/views.js.map +1 -0
- package/dist/server/views/schema.d.ts +2 -0
- package/dist/server/views/schema.js +121 -0
- package/dist/server/views/schema.js.map +1 -0
- package/dist/server/views/store.d.ts +17 -0
- package/dist/server/views/store.js +67 -0
- package/dist/server/views/store.js.map +1 -0
- package/dist/shared/adf.d.ts +83 -0
- package/dist/shared/adf.js +795 -0
- package/dist/shared/adf.js.map +1 -0
- package/dist/shared/blocking.d.ts +130 -0
- package/dist/shared/blocking.js +179 -0
- package/dist/shared/blocking.js.map +1 -0
- package/dist/shared/changes.d.ts +100 -0
- package/dist/shared/changes.js +112 -0
- package/dist/shared/changes.js.map +1 -0
- package/dist/shared/cohesion.d.ts +75 -0
- package/dist/shared/cohesion.js +132 -0
- package/dist/shared/cohesion.js.map +1 -0
- package/dist/shared/dependency-rollup.d.ts +91 -0
- package/dist/shared/dependency-rollup.js +132 -0
- package/dist/shared/dependency-rollup.js.map +1 -0
- package/dist/shared/errors.d.ts +23 -0
- package/dist/shared/errors.js +24 -0
- package/dist/shared/errors.js.map +1 -0
- package/dist/shared/flag-rollup.d.ts +88 -0
- package/dist/shared/flag-rollup.js +119 -0
- package/dist/shared/flag-rollup.js.map +1 -0
- package/dist/shared/git-sync.d.ts +90 -0
- package/dist/shared/git-sync.js +9 -0
- package/dist/shared/git-sync.js.map +1 -0
- package/dist/shared/index.d.ts +40 -0
- package/dist/shared/index.js +41 -0
- package/dist/shared/index.js.map +1 -0
- package/dist/shared/model.d.ts +218 -0
- package/dist/shared/model.js +95 -0
- package/dist/shared/model.js.map +1 -0
- package/dist/shared/period-query.d.ts +21 -0
- package/dist/shared/period-query.js +26 -0
- package/dist/shared/period-query.js.map +1 -0
- package/dist/shared/period-stance.d.ts +45 -0
- package/dist/shared/period-stance.js +50 -0
- package/dist/shared/period-stance.js.map +1 -0
- package/dist/shared/plans/breakdown.d.ts +66 -0
- package/dist/shared/plans/breakdown.js +186 -0
- package/dist/shared/plans/breakdown.js.map +1 -0
- package/dist/shared/plans/index.d.ts +21 -0
- package/dist/shared/plans/index.js +22 -0
- package/dist/shared/plans/index.js.map +1 -0
- package/dist/shared/plans/instantiate.d.ts +61 -0
- package/dist/shared/plans/instantiate.js +184 -0
- package/dist/shared/plans/instantiate.js.map +1 -0
- package/dist/shared/plans/reading.d.ts +79 -0
- package/dist/shared/plans/reading.js +149 -0
- package/dist/shared/plans/reading.js.map +1 -0
- package/dist/shared/plans/reparent.d.ts +54 -0
- package/dist/shared/plans/reparent.js +217 -0
- package/dist/shared/plans/reparent.js.map +1 -0
- package/dist/shared/plans/timeline.d.ts +93 -0
- package/dist/shared/plans/timeline.js +224 -0
- package/dist/shared/plans/timeline.js.map +1 -0
- package/dist/shared/plans/upstream.d.ts +67 -0
- package/dist/shared/plans/upstream.js +73 -0
- package/dist/shared/plans/upstream.js.map +1 -0
- package/dist/shared/remote-api.d.ts +413 -0
- package/dist/shared/remote-api.js +11 -0
- package/dist/shared/remote-api.js.map +1 -0
- package/dist/shared/remote-coverage.d.ts +120 -0
- package/dist/shared/remote-coverage.js +98 -0
- package/dist/shared/remote-coverage.js.map +1 -0
- package/dist/shared/remote-readiness.d.ts +162 -0
- package/dist/shared/remote-readiness.js +49 -0
- package/dist/shared/remote-readiness.js.map +1 -0
- package/dist/shared/remote-status.d.ts +268 -0
- package/dist/shared/remote-status.js +79 -0
- package/dist/shared/remote-status.js.map +1 -0
- package/dist/shared/rollup.d.ts +90 -0
- package/dist/shared/rollup.js +119 -0
- package/dist/shared/rollup.js.map +1 -0
- package/dist/shared/static.d.ts +65 -0
- package/dist/shared/static.js +107 -0
- package/dist/shared/static.js.map +1 -0
- package/dist/shared/template-params.d.ts +80 -0
- package/dist/shared/template-params.js +141 -0
- package/dist/shared/template-params.js.map +1 -0
- package/dist/shared/view.d.ts +105 -0
- package/dist/shared/view.js +44 -0
- package/dist/shared/view.js.map +1 -0
- package/dist/shared/work-unit.d.ts +34 -0
- package/dist/shared/work-unit.js +47 -0
- package/dist/shared/work-unit.js.map +1 -0
- package/dist/sync/apply.d.ts +21 -0
- package/dist/sync/apply.js +149 -0
- package/dist/sync/apply.js.map +1 -0
- package/dist/sync/dto.d.ts +9 -0
- package/dist/sync/dto.js +162 -0
- package/dist/sync/dto.js.map +1 -0
- package/dist/sync/index.d.ts +24 -0
- package/dist/sync/index.js +25 -0
- package/dist/sync/index.js.map +1 -0
- package/dist/sync/patch.d.ts +13 -0
- package/dist/sync/patch.js +212 -0
- package/dist/sync/patch.js.map +1 -0
- package/dist/sync/session.d.ts +31 -0
- package/dist/sync/session.js +55 -0
- package/dist/sync/session.js.map +1 -0
- package/dist/sync/static.d.ts +11 -0
- package/dist/sync/static.js +33 -0
- package/dist/sync/static.js.map +1 -0
- package/package.json +95 -4
- package/templates/blank.yml +71 -0
- package/templates/context/bug.md +107 -0
- package/templates/context/default.md +119 -0
- package/templates/context/epic.md +81 -0
- package/templates/context/feature.md +91 -0
- package/templates/context/research.md +87 -0
- package/templates/context/review.md +81 -0
- package/templates/context/story.md +94 -0
- package/templates/context/sub_task.md +108 -0
- package/templates/context/task.md +86 -0
- package/templates/context/test.md +73 -0
- package/templates/context/user_story.md +147 -0
- package/templates/kanban.yml +226 -0
- package/templates/scrum.yml +567 -0
- package/web/dist/assets/index-D0j8OnHq.js +35 -0
- package/web/dist/assets/index-DFL7v8aP.css +1 -0
- package/web/dist/index.html +13 -0
- package/web/dist-viewer/assets/index-Bcns6OuC.css +1 -0
- package/web/dist-viewer/assets/index-vVXzeiFo.js +7 -0
- package/web/dist-viewer/index.html +14 -0
|
@@ -0,0 +1,774 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The GitHub connector — a live connection to one repo, driven by the executor
|
|
3
|
+
* (LP-490).
|
|
4
|
+
*
|
|
5
|
+
* Built from a validated `connection` block (`repo`, optional `token` and
|
|
6
|
+
* `base_url`). All network I/O in the remote layer lives here, never in the
|
|
7
|
+
* planners: `planPush` and `planPull` stay pure, and a dry-run shares their
|
|
8
|
+
* code path because the executor is the only thing that ever calls this.
|
|
9
|
+
*
|
|
10
|
+
* GitHub cannot hard-delete an issue over the REST API, so `delete` closes the
|
|
11
|
+
* issue instead — the degradation is documented here rather than silently
|
|
12
|
+
* pretended away, and the capabilities of the provider say as much.
|
|
13
|
+
*
|
|
14
|
+
* `request.period` is applied to the configured carrier (LP-313): a
|
|
15
|
+
* `milestones` carrier resolves the period's name to a repository milestone
|
|
16
|
+
* (creating it when absent) and writes `milestone` on the issue; an
|
|
17
|
+
* `iteration` carrier resolves the period's name to a Project iteration and
|
|
18
|
+
* writes the Project field value. A `null` period clears the carrier.
|
|
19
|
+
*
|
|
20
|
+
* `request.parent` is applied as a native sub-issue where the account has the
|
|
21
|
+
* API (LP-309): the issue is filed, then added to its parent through the
|
|
22
|
+
* sub-issues endpoint. The executor only sets `parent` when the resolved
|
|
23
|
+
* hierarchy encoding is `sub-issues` and the document sits within the native
|
|
24
|
+
* depth; deeper parents ride the managed block instead (see `hierarchy.ts`).
|
|
25
|
+
*/
|
|
26
|
+
import { BoardError } from '../../../core/errors.js';
|
|
27
|
+
import { reconcileLabels } from '../../labels.js';
|
|
28
|
+
import { normalizePeriodMapping } from '../../periods.js';
|
|
29
|
+
import { nextLink } from '../../transport/http.js';
|
|
30
|
+
import { githubNativeParentIdOf } from './hierarchy.js';
|
|
31
|
+
import { findProjectItemId, projectStatusFieldOf, readProjectItemFieldValue, setProjectStatusField, } from './project-status.js';
|
|
32
|
+
import { clearProjectIteration, projectIterationFieldOf, readProjectIteration, setProjectIteration, } from './project-iteration.js';
|
|
33
|
+
import { resolveProjectIds, } from './projects.js';
|
|
34
|
+
const DEFAULT_BASE = 'https://api.github.com';
|
|
35
|
+
/**
|
|
36
|
+
* A pull request is an issue carrying GitHub's `pull_request` marker — never a
|
|
37
|
+
* story. The Issues API returns both, and treating a PR as a story is the
|
|
38
|
+
* classic GitHub integration bug (LP-315), invisible until a board fills with
|
|
39
|
+
* "Bump lodash".
|
|
40
|
+
*/
|
|
41
|
+
function isPullRequest(record) {
|
|
42
|
+
const marker = record['pull_request'];
|
|
43
|
+
return marker !== undefined && marker !== null;
|
|
44
|
+
}
|
|
45
|
+
/** Turn a GitHub API response body into a `ConnectorResult`. */
|
|
46
|
+
function resultOf(issue, repo) {
|
|
47
|
+
const number = issue.number;
|
|
48
|
+
const id = typeof number === 'number' ? String(number) : String(number ?? '');
|
|
49
|
+
const htmlUrl = typeof issue.html_url === 'string' ? issue.html_url : '';
|
|
50
|
+
const updatedAt = typeof issue.updated_at === 'string' ? issue.updated_at : '';
|
|
51
|
+
const nodeId = typeof issue.node_id === 'string' ? issue.node_id : undefined;
|
|
52
|
+
return {
|
|
53
|
+
remoteId: id,
|
|
54
|
+
remoteKey: `${repo}#${id}`,
|
|
55
|
+
remoteUrl: htmlUrl,
|
|
56
|
+
remoteRev: updatedAt,
|
|
57
|
+
// The GraphQL node id, recorded beside the number so a later GraphQL
|
|
58
|
+
// story (sub-issues, Projects v2) can address the issue without a second
|
|
59
|
+
// lookup (LP-307).
|
|
60
|
+
...(nodeId !== undefined ? { nodeId } : {}),
|
|
61
|
+
// The full post-write issue, so the executor records the base from what
|
|
62
|
+
// GitHub actually stored — not what we asked it to (LP-288).
|
|
63
|
+
record: issue,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Turn a GitHub issue-comment response into a `ConnectorResult`. `remoteId`
|
|
68
|
+
* stays the issue id (the document the comment hangs off); the comment's own
|
|
69
|
+
* id travels in `commentId`, which is what the executor records in the link
|
|
70
|
+
* store so the next push edits rather than duplicates it (LP-278).
|
|
71
|
+
*/
|
|
72
|
+
function commentResult(comment, repo, issueRemoteId) {
|
|
73
|
+
const id = comment.id;
|
|
74
|
+
const commentId = typeof id === 'number' ? String(id) : String(id ?? '');
|
|
75
|
+
const htmlUrl = typeof comment.html_url === 'string' ? comment.html_url : '';
|
|
76
|
+
const updatedAt = typeof comment.updated_at === 'string' ? comment.updated_at : '';
|
|
77
|
+
return {
|
|
78
|
+
remoteId: issueRemoteId,
|
|
79
|
+
remoteKey: `${repo}#${issueRemoteId}`,
|
|
80
|
+
remoteUrl: htmlUrl,
|
|
81
|
+
remoteRev: updatedAt,
|
|
82
|
+
commentId,
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Build a GitHub connector from a validated connection block.
|
|
87
|
+
*
|
|
88
|
+
* `repo` is required (the schema enforces it); `token` authenticates when
|
|
89
|
+
* present, and `base_url` points at a GitHub Enterprise host when set.
|
|
90
|
+
*/
|
|
91
|
+
export function githubConnector(connection, _mapping = {}, context) {
|
|
92
|
+
const conn = connection;
|
|
93
|
+
const mapping = _mapping;
|
|
94
|
+
const base = conn.base_url ?? DEFAULT_BASE;
|
|
95
|
+
const repo = conn.repo;
|
|
96
|
+
const headers = {
|
|
97
|
+
Accept: 'application/vnd.github+json',
|
|
98
|
+
'User-Agent': 'light-plan',
|
|
99
|
+
};
|
|
100
|
+
if (conn.token)
|
|
101
|
+
headers.Authorization = `Bearer ${conn.token}`;
|
|
102
|
+
async function call(method, path, body, signal) {
|
|
103
|
+
let response;
|
|
104
|
+
try {
|
|
105
|
+
response = await fetch(`${base}${path}`, {
|
|
106
|
+
method,
|
|
107
|
+
headers: body === undefined ? headers : { ...headers, 'Content-Type': 'application/json' },
|
|
108
|
+
body: body === undefined ? undefined : JSON.stringify(body),
|
|
109
|
+
signal,
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
catch (error) {
|
|
113
|
+
throw new BoardError(`GitHub request failed: ${method} ${path}`, [
|
|
114
|
+
error.message,
|
|
115
|
+
]);
|
|
116
|
+
}
|
|
117
|
+
if (response.status === 404)
|
|
118
|
+
return null;
|
|
119
|
+
if (!response.ok) {
|
|
120
|
+
throw new BoardError(`GitHub ${method} ${path} failed (${response.status})`, [
|
|
121
|
+
await response.text(),
|
|
122
|
+
]);
|
|
123
|
+
}
|
|
124
|
+
if (response.status === 204)
|
|
125
|
+
return null;
|
|
126
|
+
return (await response.json());
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* One page of the issues listing: the records plus the absolute URL of the
|
|
130
|
+
* next page from the `Link` header's `rel="next"`, or `null` on the last
|
|
131
|
+
* page. `url` is absolute — the first page is composed by the caller from
|
|
132
|
+
* `base`, later pages arrive as absolute URLs GitHub returns.
|
|
133
|
+
*/
|
|
134
|
+
async function callPage(url) {
|
|
135
|
+
let response;
|
|
136
|
+
try {
|
|
137
|
+
response = await fetch(url, { method: 'GET', headers });
|
|
138
|
+
}
|
|
139
|
+
catch (error) {
|
|
140
|
+
throw new BoardError(`GitHub request failed: GET ${url}`, [error.message]);
|
|
141
|
+
}
|
|
142
|
+
if (response.status === 404)
|
|
143
|
+
return { records: [], next: null };
|
|
144
|
+
if (!response.ok) {
|
|
145
|
+
throw new BoardError(`GitHub GET ${url} failed (${response.status})`, [await response.text()]);
|
|
146
|
+
}
|
|
147
|
+
if (response.status === 204)
|
|
148
|
+
return { records: [], next: null };
|
|
149
|
+
const body = (await response.json());
|
|
150
|
+
const records = Array.isArray(body) ? body : [];
|
|
151
|
+
const next = nextLink(Object.fromEntries(response.headers.entries()));
|
|
152
|
+
return { records, next };
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* A probe read: "does this account have X?" 401/403/404/410 all answer
|
|
156
|
+
* "no" — a permission loss or a plan without the feature is a capability
|
|
157
|
+
* fact, not a failure — so this returns `null` where `call` would throw.
|
|
158
|
+
*/
|
|
159
|
+
async function probeCall(path) {
|
|
160
|
+
let response;
|
|
161
|
+
try {
|
|
162
|
+
response = await fetch(`${base}${path}`, { method: 'GET', headers });
|
|
163
|
+
}
|
|
164
|
+
catch (error) {
|
|
165
|
+
throw new BoardError(`GitHub probe failed: GET ${path}`, [error.message]);
|
|
166
|
+
}
|
|
167
|
+
if (response.status === 401 ||
|
|
168
|
+
response.status === 403 ||
|
|
169
|
+
response.status === 404 ||
|
|
170
|
+
response.status === 410) {
|
|
171
|
+
return null;
|
|
172
|
+
}
|
|
173
|
+
if (!response.ok) {
|
|
174
|
+
throw new BoardError(`GitHub probe GET ${path} failed (${response.status})`, [
|
|
175
|
+
await response.text(),
|
|
176
|
+
]);
|
|
177
|
+
}
|
|
178
|
+
if (response.status === 204)
|
|
179
|
+
return null;
|
|
180
|
+
return await response.json();
|
|
181
|
+
}
|
|
182
|
+
/** Read an issue's labels as plain strings, or [] when the record has none. */
|
|
183
|
+
function labelsOf(record) {
|
|
184
|
+
const labels = record?.labels;
|
|
185
|
+
if (!Array.isArray(labels))
|
|
186
|
+
return [];
|
|
187
|
+
return labels
|
|
188
|
+
.map((label) => {
|
|
189
|
+
if (typeof label === 'string')
|
|
190
|
+
return label;
|
|
191
|
+
if (label && typeof label === 'object') {
|
|
192
|
+
const name = label.name;
|
|
193
|
+
if (typeof name === 'string')
|
|
194
|
+
return name;
|
|
195
|
+
}
|
|
196
|
+
return '';
|
|
197
|
+
})
|
|
198
|
+
.filter((label) => label.length > 0);
|
|
199
|
+
}
|
|
200
|
+
/** A write failure while assigning someone: name the user and the issue. */
|
|
201
|
+
function assigneeFailure(error, where, assignee) {
|
|
202
|
+
if (!assignee) {
|
|
203
|
+
return error instanceof BoardError ? error : new BoardError(String(error));
|
|
204
|
+
}
|
|
205
|
+
return new BoardError(`Cannot assign "${assignee}" on ${where}`, [
|
|
206
|
+
`GitHub refused the assignment: ${error instanceof Error ? error.message : String(error)}`,
|
|
207
|
+
'The account may not be a collaborator on this repository.',
|
|
208
|
+
]);
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* The GraphQL entry point, shared by the returned object's `graphql` method
|
|
212
|
+
* and the Project status read/write (LP-312). The endpoint is
|
|
213
|
+
* `https://api.github.com/graphql` (or `<host>/api/graphql` beside an
|
|
214
|
+
* `/api/v3` Enterprise root); a 200 with an `errors` array is decoded and
|
|
215
|
+
* returned, not thrown — a missing node is "not found" rather than a failure.
|
|
216
|
+
*/
|
|
217
|
+
async function graphqlImpl(query, variables = {}) {
|
|
218
|
+
const endpoint = base.endsWith('/api/v3')
|
|
219
|
+
? `${base.slice(0, -'/api/v3'.length)}/api/graphql`
|
|
220
|
+
: `${base}/graphql`;
|
|
221
|
+
let response;
|
|
222
|
+
try {
|
|
223
|
+
response = await fetch(endpoint, {
|
|
224
|
+
method: 'POST',
|
|
225
|
+
headers: { ...headers, 'Content-Type': 'application/json' },
|
|
226
|
+
body: JSON.stringify({ query, variables }),
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
catch (error) {
|
|
230
|
+
throw new BoardError(`GitHub GraphQL request failed: ${endpoint}`, [
|
|
231
|
+
error.message,
|
|
232
|
+
]);
|
|
233
|
+
}
|
|
234
|
+
if (!response.ok) {
|
|
235
|
+
throw new BoardError(`GitHub GraphQL request failed (${response.status})`, [
|
|
236
|
+
await response.text(),
|
|
237
|
+
]);
|
|
238
|
+
}
|
|
239
|
+
return (await response.json());
|
|
240
|
+
}
|
|
241
|
+
/** The connector surface the Project helpers address the GraphQL API through. */
|
|
242
|
+
const projectConnector = { name: 'github', graphql: graphqlImpl };
|
|
243
|
+
/** The resolver input built from the mapping and connection (LP-310). */
|
|
244
|
+
const projectInput = () => {
|
|
245
|
+
const project = mapping['project'];
|
|
246
|
+
if (project === undefined) {
|
|
247
|
+
throw new BoardError('This remote declares no Project', [
|
|
248
|
+
'Set mapping.project before syncing the Project status field.',
|
|
249
|
+
]);
|
|
250
|
+
}
|
|
251
|
+
const fields = mapping['fields'] ?? {};
|
|
252
|
+
return {
|
|
253
|
+
repo,
|
|
254
|
+
project: project,
|
|
255
|
+
fields: Object.fromEntries(Object.entries(fields).map(([key, value]) => [key, String(value)])),
|
|
256
|
+
};
|
|
257
|
+
};
|
|
258
|
+
/** The board paths the Project ids cache lives under, or a `BoardError`. */
|
|
259
|
+
function boardPaths() {
|
|
260
|
+
if (context?.paths === undefined) {
|
|
261
|
+
throw new BoardError('The connector has no board paths for the Project ids cache', [
|
|
262
|
+
'Build the connector through `buildConnector`, which passes the board paths.',
|
|
263
|
+
]);
|
|
264
|
+
}
|
|
265
|
+
return context.paths;
|
|
266
|
+
}
|
|
267
|
+
/** Read the issue's node id (GraphQL-side) from its REST record. */
|
|
268
|
+
function nodeIdOf(issue) {
|
|
269
|
+
const nodeId = issue && typeof issue === 'object' ? issue['node_id'] : undefined;
|
|
270
|
+
return typeof nodeId === 'string' ? nodeId : undefined;
|
|
271
|
+
}
|
|
272
|
+
async function setProjectStatusImpl(remoteId, value, signal) {
|
|
273
|
+
const fieldName = projectStatusFieldOf(mapping);
|
|
274
|
+
if (fieldName === undefined)
|
|
275
|
+
return; // no Project status field — nothing to write
|
|
276
|
+
const nodeId = nodeIdOf(await call('GET', `/repos/${repo}/issues/${remoteId}`, undefined, signal));
|
|
277
|
+
if (nodeId === undefined) {
|
|
278
|
+
throw new BoardError(`Cannot set the Project status for issue #${remoteId}: no node id`, [
|
|
279
|
+
'The issue record did not carry a node_id, so the Project item cannot be addressed.',
|
|
280
|
+
]);
|
|
281
|
+
}
|
|
282
|
+
const input = projectInput();
|
|
283
|
+
const resolved = await resolveProjectIds(projectConnector, input, boardPaths(), context?.remoteName ?? 'github');
|
|
284
|
+
await setProjectStatusField(projectConnector, resolved.ids, fieldName, nodeId, value);
|
|
285
|
+
}
|
|
286
|
+
async function readProjectStatusImpl(remoteId, signal) {
|
|
287
|
+
const fieldName = projectStatusFieldOf(mapping);
|
|
288
|
+
if (fieldName === undefined)
|
|
289
|
+
return undefined;
|
|
290
|
+
const nodeId = nodeIdOf(await call('GET', `/repos/${repo}/issues/${remoteId}`, undefined, signal));
|
|
291
|
+
if (nodeId === undefined)
|
|
292
|
+
return undefined;
|
|
293
|
+
const input = projectInput();
|
|
294
|
+
const resolved = await resolveProjectIds(projectConnector, input, boardPaths(), context?.remoteName ?? 'github');
|
|
295
|
+
const fieldId = resolved.ids.fields[fieldName]?.id;
|
|
296
|
+
if (fieldId === undefined)
|
|
297
|
+
return undefined;
|
|
298
|
+
const itemId = await findProjectItemId(projectConnector, resolved.ids.project.id, nodeId);
|
|
299
|
+
if (itemId === null)
|
|
300
|
+
return undefined;
|
|
301
|
+
return readProjectItemFieldValue(projectConnector, itemId, fieldId);
|
|
302
|
+
}
|
|
303
|
+
// -- period carrier (LP-313) ------------------------------------------------
|
|
304
|
+
/** The configured carrier, defaulting to milestones (never `sprint` here —
|
|
305
|
+
* that carrier is Jira's). */
|
|
306
|
+
function periodCarrier() {
|
|
307
|
+
const periodMapping = normalizePeriodMapping(mapping['periods']);
|
|
308
|
+
return periodMapping?.carrier ?? 'milestones';
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* Resolve a period's name to a repository milestone number, creating the
|
|
312
|
+
* milestone (with its due date) when the repository does not have it.
|
|
313
|
+
* Milestones are creatable over REST, so a missing one is provisioned rather
|
|
314
|
+
* than refused — the same idempotent-by-construction "desired minus current"
|
|
315
|
+
* behaviour `provision` follows.
|
|
316
|
+
*/
|
|
317
|
+
async function milestoneNumberOf(container) {
|
|
318
|
+
const response = await call('GET', `/repos/${repo}/milestones?state=all&per_page=100`);
|
|
319
|
+
const milestones = Array.isArray(response) ? response : [];
|
|
320
|
+
const match = milestones.find((entry) => {
|
|
321
|
+
if (!entry || typeof entry !== 'object')
|
|
322
|
+
return false;
|
|
323
|
+
return entry.title === container.name;
|
|
324
|
+
});
|
|
325
|
+
const number = match ? match.number : undefined;
|
|
326
|
+
if (typeof number === 'number')
|
|
327
|
+
return number;
|
|
328
|
+
const created = await call('POST', `/repos/${repo}/milestones`, {
|
|
329
|
+
title: container.name,
|
|
330
|
+
...(container.ends !== undefined ? { due_on: container.ends } : {}),
|
|
331
|
+
});
|
|
332
|
+
const createdNumber = created ? created.number : undefined;
|
|
333
|
+
if (typeof createdNumber === 'number')
|
|
334
|
+
return createdNumber;
|
|
335
|
+
throw new BoardError(`Cannot create milestone "${container.name}" in ${repo}`, [
|
|
336
|
+
'The repository refused the milestone; check the credential can create milestones.',
|
|
337
|
+
]);
|
|
338
|
+
}
|
|
339
|
+
/**
|
|
340
|
+
* The `milestone` value for a REST create/update body: a number when the
|
|
341
|
+
* period resolves to a milestone, `null` to clear, `undefined` to leave the
|
|
342
|
+
* remote untouched. The `iteration` carrier never writes a REST milestone.
|
|
343
|
+
*/
|
|
344
|
+
async function milestoneFieldFor(request) {
|
|
345
|
+
if (periodCarrier() !== 'milestones')
|
|
346
|
+
return undefined;
|
|
347
|
+
if (request.period === undefined)
|
|
348
|
+
return undefined;
|
|
349
|
+
if (request.period === null)
|
|
350
|
+
return null;
|
|
351
|
+
return milestoneNumberOf(request.period);
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* Write the period to a Project iteration field after the issue exists
|
|
355
|
+
* (LP-313). The iteration carrier needs the issue's node id — which the REST
|
|
356
|
+
* create/update response carries — so this runs after the REST write. A
|
|
357
|
+
* `null` period clears the field; an absent period leaves it untouched.
|
|
358
|
+
*/
|
|
359
|
+
async function applyIterationPeriod(request, issue, signal) {
|
|
360
|
+
if (periodCarrier() !== 'iteration')
|
|
361
|
+
return;
|
|
362
|
+
if (request.period === undefined)
|
|
363
|
+
return;
|
|
364
|
+
const fieldName = projectIterationFieldOf(mapping);
|
|
365
|
+
if (fieldName === undefined)
|
|
366
|
+
return;
|
|
367
|
+
const nodeId = nodeIdOf(issue);
|
|
368
|
+
if (nodeId === undefined) {
|
|
369
|
+
throw new BoardError('Cannot write the Project iteration: the issue record has no node id', [
|
|
370
|
+
'The issue record did not carry a node_id, so the Project item cannot be addressed.',
|
|
371
|
+
]);
|
|
372
|
+
}
|
|
373
|
+
const resolved = await resolveProjectIds(projectConnector, projectInput(), boardPaths(), context?.remoteName ?? 'github');
|
|
374
|
+
if (request.period === null) {
|
|
375
|
+
await clearProjectIteration(projectConnector, resolved.ids, fieldName, nodeId, signal);
|
|
376
|
+
}
|
|
377
|
+
else {
|
|
378
|
+
await setProjectIteration(projectConnector, resolved.ids, fieldName, nodeId, request.period.name);
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
/**
|
|
382
|
+
* Best-effort: add the iteration title to a record as `project_iteration`,
|
|
383
|
+
* for the pull to resolve (LP-313). A remote with no Project, or an issue
|
|
384
|
+
* not in the Project, simply stays unenriched — the carrier has no value to
|
|
385
|
+
* recover, which is the honest answer rather than a failure.
|
|
386
|
+
*/
|
|
387
|
+
async function enrichIteration(record, signal) {
|
|
388
|
+
if (record === null)
|
|
389
|
+
return null;
|
|
390
|
+
if (periodCarrier() !== 'iteration')
|
|
391
|
+
return record;
|
|
392
|
+
const fieldName = projectIterationFieldOf(mapping);
|
|
393
|
+
if (fieldName === undefined)
|
|
394
|
+
return record;
|
|
395
|
+
const nodeId = nodeIdOf(record);
|
|
396
|
+
if (nodeId === undefined)
|
|
397
|
+
return record;
|
|
398
|
+
try {
|
|
399
|
+
const resolved = await resolveProjectIds(projectConnector, projectInput(), boardPaths(), context?.remoteName ?? 'github');
|
|
400
|
+
const fieldId = resolved.ids.fields[fieldName]?.id;
|
|
401
|
+
if (fieldId === undefined)
|
|
402
|
+
return record;
|
|
403
|
+
const itemId = await findProjectItemId(projectConnector, resolved.ids.project.id, nodeId);
|
|
404
|
+
if (itemId === null)
|
|
405
|
+
return record;
|
|
406
|
+
const title = await readProjectIteration(projectConnector, itemId, fieldId);
|
|
407
|
+
if (title !== undefined)
|
|
408
|
+
return { ...record, project_iteration: title };
|
|
409
|
+
}
|
|
410
|
+
catch {
|
|
411
|
+
// Enrichment never fails a read: a missing Project is not a missing issue.
|
|
412
|
+
}
|
|
413
|
+
return record;
|
|
414
|
+
}
|
|
415
|
+
async function readProjectPeriodImpl(remoteId, signal) {
|
|
416
|
+
const fieldName = projectIterationFieldOf(mapping);
|
|
417
|
+
if (fieldName === undefined)
|
|
418
|
+
return undefined;
|
|
419
|
+
if (periodCarrier() !== 'iteration')
|
|
420
|
+
return undefined;
|
|
421
|
+
const nodeId = nodeIdOf(await call('GET', `/repos/${repo}/issues/${remoteId}`, undefined, signal));
|
|
422
|
+
if (nodeId === undefined)
|
|
423
|
+
return undefined;
|
|
424
|
+
const resolved = await resolveProjectIds(projectConnector, projectInput(), boardPaths(), context?.remoteName ?? 'github');
|
|
425
|
+
const fieldId = resolved.ids.fields[fieldName]?.id;
|
|
426
|
+
if (fieldId === undefined)
|
|
427
|
+
return undefined;
|
|
428
|
+
const itemId = await findProjectItemId(projectConnector, resolved.ids.project.id, nodeId);
|
|
429
|
+
if (itemId === null)
|
|
430
|
+
return undefined;
|
|
431
|
+
return readProjectIteration(projectConnector, itemId, fieldId);
|
|
432
|
+
}
|
|
433
|
+
return {
|
|
434
|
+
name: 'github',
|
|
435
|
+
async create(request, signal) {
|
|
436
|
+
try {
|
|
437
|
+
const milestone = await milestoneFieldFor(request);
|
|
438
|
+
const issue = await call('POST', `/repos/${repo}/issues`, {
|
|
439
|
+
title: request.title,
|
|
440
|
+
body: request.body,
|
|
441
|
+
labels: request.labels ?? [],
|
|
442
|
+
// A new issue starts unassigned, so only a named account is sent.
|
|
443
|
+
assignees: request.assignee ? [request.assignee] : undefined,
|
|
444
|
+
...(milestone !== undefined ? { milestone } : {}),
|
|
445
|
+
}, signal);
|
|
446
|
+
const result = resultOf(issue ?? {}, repo);
|
|
447
|
+
// Native sub-issue parent (LP-309): the parent's number is the path,
|
|
448
|
+
// the child's number the body. Applied only when the executor set
|
|
449
|
+
// `parent` — the `sub-issues` encoding within the native depth.
|
|
450
|
+
if (request.parent !== undefined) {
|
|
451
|
+
await call('POST', `/repos/${repo}/issues/${request.parent}/sub_issues`, {
|
|
452
|
+
sub_issue_id: Number(result.remoteId),
|
|
453
|
+
}, signal);
|
|
454
|
+
}
|
|
455
|
+
// Period carrier (LP-313): a milestone rode the POST body; an
|
|
456
|
+
// iteration is written after the issue exists (its node id is in the
|
|
457
|
+
// response).
|
|
458
|
+
await applyIterationPeriod(request, issue ?? null, signal);
|
|
459
|
+
// **A created issue is open, whatever status the board asked for.**
|
|
460
|
+
// `POST /issues` takes no `state`, so a closed board document arrives
|
|
461
|
+
// open and stays open: the base is recomputed from the echo, and where
|
|
462
|
+
// the echo cannot be read back to a single board status the local
|
|
463
|
+
// value stands — so both sides record agreement on a state the remote
|
|
464
|
+
// does not hold, and no later push disagrees. Closing here is what
|
|
465
|
+
// `update` already does one call later for a twin that exists.
|
|
466
|
+
if (request.state === 'closed') {
|
|
467
|
+
const closed = await call('PATCH', `/repos/${repo}/issues/${result.remoteId}`, { state: 'closed' }, signal);
|
|
468
|
+
return resultOf(closed ?? issue ?? {}, repo);
|
|
469
|
+
}
|
|
470
|
+
return result;
|
|
471
|
+
}
|
|
472
|
+
catch (error) {
|
|
473
|
+
throw assigneeFailure(error, 'the new issue', request.assignee);
|
|
474
|
+
}
|
|
475
|
+
},
|
|
476
|
+
async update(remoteId, request, signal) {
|
|
477
|
+
try {
|
|
478
|
+
// Reconcile labels against what the issue already carries (LP-308):
|
|
479
|
+
// only the mapping's claimed labels are added or removed, so a human's
|
|
480
|
+
// triage labels survive. Absent labels (or no claim) means the list is
|
|
481
|
+
// sent as-is, the pre-reconciliation behaviour.
|
|
482
|
+
let labels = request.labels;
|
|
483
|
+
if (request.labels !== undefined && request.labelClaim !== undefined) {
|
|
484
|
+
const current = await call('GET', `/repos/${repo}/issues/${remoteId}`, undefined, signal);
|
|
485
|
+
labels = reconcileLabels(labelsOf(current), request.labels, request.labelClaim);
|
|
486
|
+
}
|
|
487
|
+
const milestone = await milestoneFieldFor(request);
|
|
488
|
+
const issue = await call('PATCH', `/repos/${repo}/issues/${remoteId}`, {
|
|
489
|
+
title: request.title,
|
|
490
|
+
body: request.body,
|
|
491
|
+
labels,
|
|
492
|
+
state: request.state,
|
|
493
|
+
// `assignees: []` clears, a non-empty string assigns, `undefined`
|
|
494
|
+
// leaves the remote side untouched.
|
|
495
|
+
assignees: request.assignee === undefined
|
|
496
|
+
? undefined
|
|
497
|
+
: request.assignee === null
|
|
498
|
+
? []
|
|
499
|
+
: [request.assignee],
|
|
500
|
+
...(milestone !== undefined ? { milestone } : {}),
|
|
501
|
+
}, signal);
|
|
502
|
+
// Period carrier (LP-313): an iteration is written after the REST
|
|
503
|
+
// write, once the response carries the node id.
|
|
504
|
+
await applyIterationPeriod(request, issue ?? null, signal);
|
|
505
|
+
return resultOf(issue ?? {}, repo);
|
|
506
|
+
}
|
|
507
|
+
catch (error) {
|
|
508
|
+
throw assigneeFailure(error, `issue #${remoteId}`, request.assignee);
|
|
509
|
+
}
|
|
510
|
+
},
|
|
511
|
+
async reparent(remoteId, parentRemoteId, signal) {
|
|
512
|
+
// Move an existing issue's native sub-issue parent (LP-493). Idempotent:
|
|
513
|
+
// the issue's *native* parent is read first, so setting the parent it
|
|
514
|
+
// already has, or clearing one it does not have, makes no write. The
|
|
515
|
+
// block's `parent` row is a different carrier and is deliberately not
|
|
516
|
+
// consulted — a labels→sub-issues migration still writes the native
|
|
517
|
+
// edge even while the redundant block row is in place.
|
|
518
|
+
const read = async () => (await call('GET', `/repos/${repo}/issues/${remoteId}`, undefined, signal)) ?? {};
|
|
519
|
+
const current = await read();
|
|
520
|
+
const nativeParent = githubNativeParentIdOf(current);
|
|
521
|
+
if (parentRemoteId === null) {
|
|
522
|
+
if (nativeParent === undefined)
|
|
523
|
+
return resultOf(current, repo);
|
|
524
|
+
await call('DELETE', `/repos/${repo}/issues/${remoteId}/sub_issue`, undefined, signal);
|
|
525
|
+
return resultOf(await read(), repo);
|
|
526
|
+
}
|
|
527
|
+
if (nativeParent === parentRemoteId)
|
|
528
|
+
return resultOf(current, repo);
|
|
529
|
+
await call('POST', `/repos/${repo}/issues/${parentRemoteId}/sub_issues`, {
|
|
530
|
+
sub_issue_id: Number(remoteId),
|
|
531
|
+
}, signal);
|
|
532
|
+
return resultOf(await read(), repo);
|
|
533
|
+
},
|
|
534
|
+
async delete(remoteId, signal) {
|
|
535
|
+
// GitHub issues cannot be hard-deleted over REST; closing is the nearest
|
|
536
|
+
// thing. The provider's capabilities record this degradation.
|
|
537
|
+
const issue = await call('PATCH', `/repos/${repo}/issues/${remoteId}`, {
|
|
538
|
+
state: 'closed',
|
|
539
|
+
}, signal);
|
|
540
|
+
return resultOf(issue ?? {}, repo);
|
|
541
|
+
},
|
|
542
|
+
async get(remoteId) {
|
|
543
|
+
const record = await call('GET', `/repos/${repo}/issues/${remoteId}`);
|
|
544
|
+
return enrichIteration(record);
|
|
545
|
+
},
|
|
546
|
+
async resolve(key) {
|
|
547
|
+
// `acme/payments#418` → 418; a bare `418` is accepted too. The number
|
|
548
|
+
// is the remote id `get` addresses; the repo part is carried back in the
|
|
549
|
+
// human-readable key so adoption records the same shape a create would.
|
|
550
|
+
const remoteId = key.includes('#') ? key.slice(key.lastIndexOf('#') + 1) : key;
|
|
551
|
+
const record = await call('GET', `/repos/${repo}/issues/${remoteId}`);
|
|
552
|
+
if (record === null)
|
|
553
|
+
return null;
|
|
554
|
+
return resultOf(record, repo);
|
|
555
|
+
},
|
|
556
|
+
describe(record) {
|
|
557
|
+
const result = resultOf(record, repo);
|
|
558
|
+
return { remoteKey: result.remoteKey, remoteUrl: result.remoteUrl };
|
|
559
|
+
},
|
|
560
|
+
async list(opts) {
|
|
561
|
+
// Sorted by `updated` ascending, so the `since` cursor filters the
|
|
562
|
+
// listing and the pages come back oldest-first; `per_page` is the API
|
|
563
|
+
// maximum, and each page is followed through the `Link` header's
|
|
564
|
+
// `rel="next"` until the listing is exhausted (LP-315).
|
|
565
|
+
const params = new URLSearchParams({
|
|
566
|
+
state: 'all',
|
|
567
|
+
per_page: '100',
|
|
568
|
+
sort: 'updated',
|
|
569
|
+
direction: 'asc',
|
|
570
|
+
});
|
|
571
|
+
if (opts?.cursor)
|
|
572
|
+
params.set('since', opts.cursor);
|
|
573
|
+
// Page through the whole listing, dropping pull requests — the Issues
|
|
574
|
+
// API returns them, and a PR is never a story (LP-315).
|
|
575
|
+
const records = [];
|
|
576
|
+
let url = `${base}/repos/${repo}/issues?${params.toString()}`;
|
|
577
|
+
let pages = 0;
|
|
578
|
+
while (url !== null) {
|
|
579
|
+
const page = await callPage(url);
|
|
580
|
+
for (const record of page.records) {
|
|
581
|
+
if (isPullRequest(record))
|
|
582
|
+
continue;
|
|
583
|
+
records.push(record);
|
|
584
|
+
}
|
|
585
|
+
pages += 1;
|
|
586
|
+
opts?.onPage?.({ page: pages, records: records.length });
|
|
587
|
+
url = page.next;
|
|
588
|
+
}
|
|
589
|
+
// The cursor is the newest `updated_at` seen, so the next pull asks only
|
|
590
|
+
// for what changed after it. Pull requests never contribute: a PR's
|
|
591
|
+
// timestamp is not a story's.
|
|
592
|
+
let cursor = null;
|
|
593
|
+
for (const record of records) {
|
|
594
|
+
if (typeof record.updated_at === 'string') {
|
|
595
|
+
if (cursor === null || record.updated_at > cursor)
|
|
596
|
+
cursor = record.updated_at;
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
// Enrich each record with its iteration title when the carrier is an
|
|
600
|
+
// iteration field (LP-313), so the pull resolves the period the way it
|
|
601
|
+
// resolves a milestone off the REST record.
|
|
602
|
+
const enriched = [];
|
|
603
|
+
for (const record of records) {
|
|
604
|
+
enriched.push((await enrichIteration(record)) ?? record);
|
|
605
|
+
}
|
|
606
|
+
return { records: enriched, cursor };
|
|
607
|
+
},
|
|
608
|
+
async probe(probeName) {
|
|
609
|
+
const owner = repo.split('/')[0];
|
|
610
|
+
switch (probeName) {
|
|
611
|
+
case 'native_types': {
|
|
612
|
+
// Org-level issue types, opt-in per repository. The presence of any
|
|
613
|
+
// org issue type is the live signal; per-repo enablement is a
|
|
614
|
+
// further check the LP-267 audit left unverified.
|
|
615
|
+
const body = await probeCall(`/orgs/${owner}/issue-types`);
|
|
616
|
+
return Array.isArray(body) && body.length > 0;
|
|
617
|
+
}
|
|
618
|
+
case 'custom_fields': {
|
|
619
|
+
// Org issue fields carry `value_type` names (`text`, `date`,
|
|
620
|
+
// `single_select`, `multi_select`, `number`). No endpoint, or none
|
|
621
|
+
// listed, means the account has no custom fields.
|
|
622
|
+
const body = await probeCall(`/orgs/${owner}/issue-fields`);
|
|
623
|
+
if (!Array.isArray(body) || body.length === 0)
|
|
624
|
+
return null;
|
|
625
|
+
const valueTypes = new Set();
|
|
626
|
+
for (const field of body) {
|
|
627
|
+
if (field &&
|
|
628
|
+
typeof field === 'object' &&
|
|
629
|
+
typeof field.value_type === 'string') {
|
|
630
|
+
valueTypes.add(field.value_type);
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
return valueTypes.size > 0 ? { valueTypes: [...valueTypes].sort() } : null;
|
|
634
|
+
}
|
|
635
|
+
case 'sub_issues': {
|
|
636
|
+
// Sub-issues vary by plan and rollout and there is no org-level
|
|
637
|
+
// "does this account have sub-issues" endpoint — the live signal is
|
|
638
|
+
// the `parent` field GitHub adds to an issue payload only where the
|
|
639
|
+
// account has the API. List one issue and ask whether its record
|
|
640
|
+
// exposes the relationship; a listing with no issues (or no parent
|
|
641
|
+
// field) reads conservatively as "flat" — an empty board has no
|
|
642
|
+
// hierarchy to encode anyway.
|
|
643
|
+
const body = await probeCall(`/repos/${repo}/issues?state=all&per_page=1`);
|
|
644
|
+
const records = Array.isArray(body) ? body : [];
|
|
645
|
+
const sample = records[0];
|
|
646
|
+
const supported = sample !== undefined &&
|
|
647
|
+
(Object.prototype.hasOwnProperty.call(sample, 'parent') ||
|
|
648
|
+
Object.prototype.hasOwnProperty.call(sample, 'parent_id'));
|
|
649
|
+
return supported ? 1 : 0;
|
|
650
|
+
}
|
|
651
|
+
case 'provisioning': {
|
|
652
|
+
// "Can this account create them?" is approximated by "the endpoint
|
|
653
|
+
// answers" — a 401/403/404 reads as no. Milestones and labels are
|
|
654
|
+
// always creatable over REST.
|
|
655
|
+
const fields = await probeCall(`/orgs/${owner}/issue-fields`);
|
|
656
|
+
return { customFields: fields !== null, periods: true, labels: true };
|
|
657
|
+
}
|
|
658
|
+
default:
|
|
659
|
+
throw new BoardError(`Unknown GitHub capability probe "${probeName}"`);
|
|
660
|
+
}
|
|
661
|
+
},
|
|
662
|
+
async reachable() {
|
|
663
|
+
// The repo itself is the bulk signal: a token that lost scope, a private
|
|
664
|
+
// repo this token cannot read, or a deleted/transferred repo all 404
|
|
665
|
+
// here, exactly as they would for a single issue — so the probe is the
|
|
666
|
+
// one read that tells "I cannot see the remote" apart from "that issue
|
|
667
|
+
// is gone". A 200 means the remote is there and readable.
|
|
668
|
+
const path = `/repos/${repo}`;
|
|
669
|
+
try {
|
|
670
|
+
const response = await fetch(`${base}${path}`, { method: 'GET', headers });
|
|
671
|
+
if (response.ok) {
|
|
672
|
+
return { reachable: true, evidence: `GET ${path} → ${response.status}` };
|
|
673
|
+
}
|
|
674
|
+
const detail = (await response.text()).trim();
|
|
675
|
+
return {
|
|
676
|
+
reachable: false,
|
|
677
|
+
evidence: detail
|
|
678
|
+
? `GET ${path} → ${response.status}: ${detail}`
|
|
679
|
+
: `GET ${path} → ${response.status}`,
|
|
680
|
+
};
|
|
681
|
+
}
|
|
682
|
+
catch (error) {
|
|
683
|
+
return {
|
|
684
|
+
reachable: false,
|
|
685
|
+
evidence: `GET ${path} failed: ${error.message}`,
|
|
686
|
+
};
|
|
687
|
+
}
|
|
688
|
+
},
|
|
689
|
+
async comment(remoteId, body, signal) {
|
|
690
|
+
// GitHub returns the created comment with its `id`, `html_url` and
|
|
691
|
+
// `updated_at`; the executor records the id so the next push edits this
|
|
692
|
+
// comment rather than posting a duplicate (LP-278).
|
|
693
|
+
const comment = await call('POST', `/repos/${repo}/issues/${remoteId}/comments`, {
|
|
694
|
+
body,
|
|
695
|
+
}, signal);
|
|
696
|
+
return commentResult(comment ?? {}, repo, remoteId);
|
|
697
|
+
},
|
|
698
|
+
async editComment(remoteId, commentId, body, signal) {
|
|
699
|
+
await call('PATCH', `/repos/${repo}/issues/comments/${commentId}`, { body }, signal);
|
|
700
|
+
return commentResult({ id: commentId }, repo, remoteId);
|
|
701
|
+
},
|
|
702
|
+
async deleteComment(remoteId, commentId, signal) {
|
|
703
|
+
// 204 No Content — the comment is gone, and the issue id is what a
|
|
704
|
+
// caller still needs to address the document.
|
|
705
|
+
await call('DELETE', `/repos/${repo}/issues/comments/${commentId}`, undefined, signal);
|
|
706
|
+
return commentResult({ id: commentId }, repo, remoteId);
|
|
707
|
+
},
|
|
708
|
+
async listComments(remoteId, signal) {
|
|
709
|
+
// `GET /repos/:owner/:repo/issues/:number/comments` returns the issue's
|
|
710
|
+
// user comments, oldest first, paged through the `Link` header like the
|
|
711
|
+
// issue listing. The author is `user.login`; a comment from a deleted
|
|
712
|
+
// account has no login and is reported under the empty name rather than
|
|
713
|
+
// dropped (the pull still appends it — the thread is the thread).
|
|
714
|
+
const comments = [];
|
|
715
|
+
let url = `${base}/repos/${repo}/issues/${remoteId}/comments?per_page=100`;
|
|
716
|
+
while (url !== null) {
|
|
717
|
+
const page = await callPage(url);
|
|
718
|
+
for (const raw of page.records) {
|
|
719
|
+
const record = raw;
|
|
720
|
+
const id = record['id'];
|
|
721
|
+
const user = record['user'];
|
|
722
|
+
const createdAt = record['created_at'];
|
|
723
|
+
comments.push({
|
|
724
|
+
id: typeof id === 'number' ? String(id) : String(id ?? ''),
|
|
725
|
+
author: typeof user?.['login'] === 'string' ? user['login'] : '',
|
|
726
|
+
createdAt: typeof createdAt === 'string' ? createdAt : '',
|
|
727
|
+
body: typeof record['body'] === 'string' ? record['body'] : '',
|
|
728
|
+
});
|
|
729
|
+
}
|
|
730
|
+
url = page.next;
|
|
731
|
+
if (signal?.aborted)
|
|
732
|
+
break;
|
|
733
|
+
}
|
|
734
|
+
return comments;
|
|
735
|
+
},
|
|
736
|
+
async listLabels() {
|
|
737
|
+
// `GET /repos/:owner/:repo/labels` returns the repo's labels, newest
|
|
738
|
+
// first, one page of 100. A larger taxonomy would need the paging the
|
|
739
|
+
// issue listing already skips; one page covers every board in practice.
|
|
740
|
+
const response = await call('GET', `/repos/${repo}/labels?per_page=100`);
|
|
741
|
+
if (!Array.isArray(response))
|
|
742
|
+
return [];
|
|
743
|
+
return response
|
|
744
|
+
.map((label) => {
|
|
745
|
+
if (typeof label === 'string')
|
|
746
|
+
return label;
|
|
747
|
+
if (label && typeof label === 'object') {
|
|
748
|
+
const name = label.name;
|
|
749
|
+
if (typeof name === 'string')
|
|
750
|
+
return name;
|
|
751
|
+
}
|
|
752
|
+
return '';
|
|
753
|
+
})
|
|
754
|
+
.filter((label) => label.length > 0);
|
|
755
|
+
},
|
|
756
|
+
async createLabel(name, color, signal) {
|
|
757
|
+
// `POST /repos/:owner/:repo/labels` creates a label; the colour is the
|
|
758
|
+
// hex string without a leading `#`. A label that already exists is a
|
|
759
|
+
// 422, which `provision` avoids by checking `listLabels` first.
|
|
760
|
+
await call('POST', `/repos/${repo}/labels`, { name, color }, signal);
|
|
761
|
+
},
|
|
762
|
+
async setProjectStatus(remoteId, value, signal) {
|
|
763
|
+
await setProjectStatusImpl(remoteId, value, signal);
|
|
764
|
+
},
|
|
765
|
+
async readProjectStatus(remoteId, signal) {
|
|
766
|
+
return readProjectStatusImpl(remoteId, signal);
|
|
767
|
+
},
|
|
768
|
+
async readProjectPeriod(remoteId, signal) {
|
|
769
|
+
return readProjectPeriodImpl(remoteId, signal);
|
|
770
|
+
},
|
|
771
|
+
graphql: graphqlImpl,
|
|
772
|
+
};
|
|
773
|
+
}
|
|
774
|
+
//# sourceMappingURL=connector.js.map
|