| 111 | var defaultsGetCurrentRepoSlug = GetCurrentRepoSlug |
| 112 | |
| 113 | func NewEnvCommand() *cobra.Command { |
| 114 | cmd := &cobra.Command{ |
| 115 | Use: "env", |
| 116 | Short: "Manage compiler defaults as GitHub variables", |
| 117 | Long: `Manage compiler default variables in batch for repository, organization, or enterprise scope. |
| 118 | |
| 119 | The YAML file is flat and uses default_-prefixed lowercase keys (e.g., default_max_turns). |
| 120 | Set a field to null (or omit it) in update mode to delete the variable from the selected scope. |
| 121 | Any field with a non-null string value will be set or updated.`, |
| 122 | RunE: func(cmd *cobra.Command, args []string) error { |
| 123 | return cmd.Help() |
| 124 | }, |
| 125 | } |
| 126 | |
| 127 | cmd.AddCommand(newDefaultsGetCommand()) |
| 128 | cmd.AddCommand(newDefaultsUpdateCommand()) |
| 129 | return cmd |
| 130 | } |
| 131 | |
| 132 | func newDefaultsGetCommand() *cobra.Command { |
| 133 | var scope, repo, org, enterprise string |