aboutsummaryrefslogtreecommitdiffstats
path: root/bridge/github/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'bridge/github/config.go')
-rw-r--r--bridge/github/config.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/bridge/github/config.go b/bridge/github/config.go
index b8531dfe..79025cfb 100644
--- a/bridge/github/config.go
+++ b/bridge/github/config.go
@@ -93,6 +93,22 @@ func (*Github) Configure(repo repository.RepoCommon) (core.Configuration, error)
return nil, nil
}
+func (*Github) ValidateConfig(conf core.Configuration) error {
+ if _, ok := conf[keyToken]; !ok {
+ return fmt.Errorf("missing %s key", keyToken)
+ }
+
+ if _, ok := conf[keyUser]; !ok {
+ return fmt.Errorf("missing %s key", keyUser)
+ }
+
+ if _, ok := conf[keyProject]; !ok {
+ return fmt.Errorf("missing %s key", keyProject)
+ }
+
+ return nil
+}
+
func requestToken(note, username, password string) (*http.Response, error) {
return requestTokenWith2FA(note, username, password, "")
}