feat(crew): add crew configuration to rigs.json for cross-machine sync
Add CrewRegistryConfig to RigEntry allowing crew members to be defined
in rigs.json and synced across machines. The new `gt crew sync` command
creates missing crew members from the configuration.
Configuration example:
"rigs": {
"gastown": {
"crew": {
"theme": "mad-max",
"members": ["diesel", "chrome", "nitro"]
}
}
}
Closes: gt-tu4
This commit is contained in:
@@ -163,10 +163,11 @@ type RigsConfig struct {
|
||||
|
||||
// RigEntry represents a single rig in the registry.
|
||||
type RigEntry struct {
|
||||
GitURL string `json:"git_url"`
|
||||
LocalRepo string `json:"local_repo,omitempty"`
|
||||
AddedAt time.Time `json:"added_at"`
|
||||
BeadsConfig *BeadsConfig `json:"beads,omitempty"`
|
||||
GitURL string `json:"git_url"`
|
||||
LocalRepo string `json:"local_repo,omitempty"`
|
||||
AddedAt time.Time `json:"added_at"`
|
||||
BeadsConfig *BeadsConfig `json:"beads,omitempty"`
|
||||
Crew *CrewRegistryConfig `json:"crew,omitempty"`
|
||||
}
|
||||
|
||||
// BeadsConfig represents beads configuration for a rig.
|
||||
@@ -175,6 +176,18 @@ type BeadsConfig struct {
|
||||
Prefix string `json:"prefix"` // issue prefix
|
||||
}
|
||||
|
||||
// CrewRegistryConfig represents crew configuration for a rig in rigs.json.
|
||||
// This enables cross-machine sync of crew member definitions.
|
||||
type CrewRegistryConfig struct {
|
||||
// Theme selects the naming theme for crew members (e.g., "mad-max", "minerals").
|
||||
// Used when displaying crew member names and for consistency across machines.
|
||||
Theme string `json:"theme,omitempty"`
|
||||
|
||||
// Members lists the crew member names to create on this rig.
|
||||
// Use `gt crew sync` to create missing members from this list.
|
||||
Members []string `json:"members,omitempty"`
|
||||
}
|
||||
|
||||
// CurrentTownVersion is the current schema version for TownConfig.
|
||||
// Version 2: Added Owner and PublicName fields for federation identity.
|
||||
const CurrentTownVersion = 2
|
||||
|
||||
Reference in New Issue
Block a user