| 162 | } |
| 163 | |
| 164 | func (*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 | |
| 183 | func requestToken() (string, error) { |
| 184 | scope, err := promptUserForProjectVisibility() |