sourcegraph / sourcegraph-public-snapshot

Code AI platform with Code Search & Cody
https://sourcegraph.com
Other
10.12k stars 1.29k forks source link

Extend GitHub token scope for campaigns by user:email #17555

Open eseliger opened 3 years ago

eseliger commented 3 years ago

In order to match PR authors to Sourcegraph users, we want to query the email address of the actor. That, however requires us to extend the token scope by user:email. Also, we need some fallback handling, so in case the token has no permission to access that field, we don't ask for it and return just the author name.

LawnGnome commented 3 years ago

We don't have a tonne of confidence that the behaviour of tokens when user:email is not in scope is stable across GitHub versions, so @LawnGnome will reach out to GitHub support to hopefully clarify, and then we'll decide whether to action this or punt it back into the backlog.