MCPcopy Create free account
hub / github.com/github/gh-aw / NewEnvCommand

Function NewEnvCommand

pkg/cli/env_command.go:113–130  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

111var defaultsGetCurrentRepoSlug = GetCurrentRepoSlug
112
113func 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
119The YAML file is flat and uses default_-prefixed lowercase keys (e.g., default_max_turns).
120Set a field to null (or omit it) in update mode to delete the variable from the selected scope.
121Any 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
132func newDefaultsGetCommand() *cobra.Command {
133 var scope, repo, org, enterprise string

Callers 3

initFunction · 0.92
TestNewEnvCommandFunction · 0.85

Calls 2

newDefaultsGetCommandFunction · 0.85
newDefaultsUpdateCommandFunction · 0.85

Tested by 2

TestNewEnvCommandFunction · 0.68