From d9c369bdc78c8ea15a01e6976d039d8e3eb41536 Mon Sep 17 00:00:00 2001 From: jdamick Date: Wed, 11 May 2016 10:32:11 -0400 Subject: [PATCH] added scopes to the oauth2 config --- remote/github/github.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/remote/github/github.go b/remote/github/github.go index df3d25a2d..80e5390ea 100644 --- a/remote/github/github.go +++ b/remote/github/github.go @@ -53,7 +53,7 @@ func New(opts Opts) (remote.Remote, error) { URL: defaultURL, Client: opts.Client, Secret: opts.Secret, - Scope: strings.Join(opts.Scopes, ","), + Scopes: opts.Scopes, PrivateMode: opts.PrivateMode, SkipVerify: opts.SkipVerify, MergeRef: opts.MergeRef, @@ -73,7 +73,7 @@ type client struct { API string Client string Secret string - Scope string + Scopes []string Machine string Username string Password string @@ -261,6 +261,7 @@ func (c *client) newConfig(redirect string) *oauth2.Config { return &oauth2.Config{ ClientID: c.Client, ClientSecret: c.Secret, + Scopes: c.Scopes, Endpoint: oauth2.Endpoint{ AuthURL: fmt.Sprintf("%s/login/oauth/authorize", c.URL), TokenURL: fmt.Sprintf("%s/login/oauth/access_token", c.URL),