MCPcopy Index your code
hub / github.com/git-bug/git-bug / ValidateConfig

Method ValidateConfig

bridge/github/config.go:164–181  ·  view source on GitHub ↗
(conf core.Configuration)

Source from the content-addressed store, hash-verified

162}
163
164func (*Github) ValidateConfig(conf core.Configuration) error {
165 if v, ok := conf[core.ConfigKeyTarget]; !ok {
166 return fmt.Errorf("missing %s key", core.ConfigKeyTarget)
167 } else if v != target {
168 return fmt.Errorf("unexpected target name: %v", v)
169 }
170 if _, ok := conf[confKeyOwner]; !ok {
171 return fmt.Errorf("missing %s key", confKeyOwner)
172 }
173 if _, ok := conf[confKeyProject]; !ok {
174 return fmt.Errorf("missing %s key", confKeyProject)
175 }
176 if _, ok := conf[confKeyDefaultLogin]; !ok {
177 return fmt.Errorf("missing %s key", confKeyDefaultLogin)
178 }
179
180 return nil
181}
182
183func requestToken() (string, error) {
184 scope, err := promptUserForProjectVisibility()

Callers 1

ConfigureMethod · 0.95

Calls 1

ErrorfMethod · 0.80

Tested by

no test coverage detected