mirror of
https://github.com/runkids/skillshare.git
synced 2026-11-20 20:34:19 +00:00
Add global project list, show, add, edit, sync and remove so setup scripts can register repositories without editing YAML or opening the dashboard. Keep dry runs read-only and report completed work when a target fails. Reuse the shared project service and sync runners. Include command docs, translations, completions and regression coverage. Quote overlap hints for their shell and log partial project syncs consistently with ordinary sync.
32 lines
1.1 KiB
Go
32 lines
1.1 KiB
Go
package projects
|
|
|
|
// Resource is one resource kind of a project. nil means it is not sent.
|
|
type Resource struct {
|
|
// Disabled preserves config state for text adapters without changing the wire DTO.
|
|
Disabled bool `json:"-"`
|
|
Mode string `json:"mode"`
|
|
TargetNaming string `json:"targetNaming,omitempty"`
|
|
Include []string `json:"include"`
|
|
Exclude []string `json:"exclude"`
|
|
}
|
|
|
|
type Group struct {
|
|
Target string `json:"target"` // target name, as the sync and target lists show it
|
|
Tools []string `json:"tools"`
|
|
SkillsPath string `json:"skillsPath"`
|
|
AgentsPath string `json:"agentsPath"`
|
|
}
|
|
|
|
type Item struct {
|
|
Root string `json:"root"` // as written in config.yaml
|
|
Path string `json:"path"` // absolute
|
|
Name string `json:"name"`
|
|
CustomName string `json:"customName,omitempty"`
|
|
Targets []string `json:"targets"`
|
|
Skills *Resource `json:"skills"`
|
|
Agents *Resource `json:"agents"`
|
|
Groups []Group `json:"groups"`
|
|
Missing bool `json:"missing"`
|
|
HasOwnConfig bool `json:"hasOwnConfig"`
|
|
}
|