aboutsummaryrefslogtreecommitdiffstats
path: root/bridge/github/config.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2018-10-07 18:27:23 +0200
committerMichael Muré <batolettre@gmail.com>2018-10-07 18:27:23 +0200
commit7cb7994cdae848053487d00c1730d1e865fb8623 (patch)
treebc9be185e81479d8d3e5b0fc636daea011a64e4c /bridge/github/config.go
parent03202fed493539c8d1fdcad7254687f951d0ca4a (diff)
downloadgit-bug-7cb7994cdae848053487d00c1730d1e865fb8623.tar.gz
github: also pull users email
Diffstat (limited to 'bridge/github/config.go')
-rw-r--r--bridge/github/config.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/bridge/github/config.go b/bridge/github/config.go
index 8aa41638..b881c585 100644
--- a/bridge/github/config.go
+++ b/bridge/github/config.go
@@ -29,7 +29,10 @@ func (*Github) Configure(repo repository.RepoCommon) (core.Configuration, error)
conf := make(core.Configuration)
fmt.Println()
- fmt.Println("git-bug will generate an access token in your Github profile. Your credential are not stored and are only used to generate the token. The token is stored in the repository git config.")
+ fmt.Println("git-bug will now generate an access token in your Github profile. Your credential are not stored and are only used to generate the token. The token is stored in the repository git config.")
+ fmt.Println()
+ fmt.Println("The token will have the following scopes:")
+ fmt.Println(" - user:email: to be able to read public-only users email")
// fmt.Println("The token will have the \"repo\" permission, giving it read/write access to your repositories and issues. There is no narrower scope available, sorry :-|")
fmt.Println()
@@ -120,7 +123,9 @@ func requestTokenWith2FA(note, username, password, otpCode string) (*http.Respon
Note string `json:"note"`
Fingerprint string `json:"fingerprint"`
}{
- // Scopes: []string{"repo"},
+ // user:email is requested to be able to read public emails
+ // - a private email will stay private, even with this token
+ Scopes: []string{"user:email"},
Note: note,
Fingerprint: randomFingerprint(),
}