Commit Graph
6 Commits
Author SHA1 Message Date
zishuo 9fcba2744d feat: 支持配置自定义 CNB 和 Gitea 主机
将 CNBHosts 和 GiteaHosts 配置从 InstallContext 传递到 Source,使认证、平台检测和克隆操作能正确识别自定义的 CNB 和 Gitea 实例,而非仅依赖内置默认域名。
2026-06-23 18:45:43 +08:00
Willie e48a301623 feat: add azure_hosts config for Azure DevOps Server on-premises
Add azure_hosts config parameter (analogous to gitlab_hosts) that allows
users to register self-hosted Azure DevOps Server hostnames so they
receive proper URL parsing without appending .git to clone URLs.

- Add AzureHosts field to Config and ProjectConfig structs
- Add SKILLSHARE_AZURE_HOSTS env var support with merge semantics
- Generalize hostname validation into shared normalizeHostList/mergeHostsFromEnv
- Add azureOnPremPattern regex and parseAzureOnPrem for /_git/ URL routing
- Add isAzureHost for config-based host detection (no auto-detect)
- Update TrackName to handle on-prem Azure DevOps clone URLs
- Wire AzureHosts through InstallContext, ParseOptions, and Server
- Add JSON Schema, UI fieldDocs, and website documentation
- Add 19 new tests covering config, source parsing, and server

Closes #147
2026-05-05 18:33:07 +08:00
Willie 8def337c05 feat(install): add Branch field to InstallOptions, SkillMeta, SkillEntry, SkillEntryDTO 2026-04-01 00:32:49 +08:00
Willie a4d52615f7 feat(config): add gitlab_hosts for custom GitLab domain support
Self-managed GitLab instances on custom domains (e.g., git.company.com)
without "gitlab" in the hostname were parsed with 2-segment owner/repo
split instead of full-path repo. Users can now declare extra GitLab
hostnames in config so the parser treats them like gitlab.com (nested
subgroup support).

- Add `gitlab_hosts` field to both global and project Config structs
- Validate entries at load time (reject scheme, path, port, empty)
- Add `ParseOptions` / `ParseSourceWithOptions` to thread hosts into parser
- Add `isGitLabHost()` helper combining built-in + custom host detection
- Extend `InstallContext` interface with `GitLabHosts()` method
- Update all ParseSource call sites (install, search, update, server)
- Add JSON schemas for both config files
- Add unit tests for config validation and source parsing
- Add E2E runbook for devcontainer verification
- Document in configuration reference and URL formats appendix
2026-03-12 16:45:02 +08:00
Willie 87abb6e049 feat(install): replace spinner with tree-style progress and summary output
Switch config install and search install UI from plain spinner to
TreeSpinner with StepResult summary showing installed/skipped/failed
counts and elapsed time. Add git clone progress callback to spinners
so users see real-time cloning status.

- Add Quiet field to InstallOptions for suppressing per-skill output
- Add Skipped field to ConfigInstallResult for accurate summary
- Update integration test assertion to match new summary format
2026-02-27 05:39:49 +08:00
Willie 0f242307f4 refactor(install): unify duplicated logic between global and project modes
Introduce InstallContext interface to abstract global/project behavioral
differences, push config-based install logic down to internal/install,
and merge the nearly-identical Git discovery/subdir handlers.

- Add InstallContext interface (SourcePath, ConfigSkills, Reconcile,
  PostInstallSkill, Mode) with SkillEntryDTO to avoid circular imports
- Add globalInstallContext and projectInstallContext implementations
- Extract InstallFromConfig() to internal/install/install_config.go,
  replacing the 90%-identical installFromGlobalConfig/installFromProjectConfig
- Merge handleGitDiscovery + handleGitSubdirInstall into handleGitInstall,
  branching on source.HasSubdir() for the few differences
2026-02-25 07:02:54 +08:00