fabric8io / fabric8-generator

a jboss forge add on for the fabric8 upstream and SaaS generator wizards
Apache License 2.0
1 stars 12 forks source link

Retrieve email for Git Author from GitHub #32

Closed aslakknutsen closed 7 years ago

aslakknutsen commented 7 years ago

Forge Generator seems to be relying on the Email in KeyCloak Token when setting up the Git Commit Author. This Email is the KC account email and might not be the same as GitHub knows. The end result is it might seem like 'someone else' is making the commit than the authorized user as there is no real link between authorization and git author on Github.

Forge Generator should call api.github.com/user and use the 'email' provided there, and if noone is set(no public email set), call api.github.com/api/user/email and use the primary one.

Related https://github.com/openshiftio/openshift.io/issues/399