From 98f6a217d3fcfc94ecb64a667a4c6e8203dda5df Mon Sep 17 00:00:00 2001
From: Chien Huey <chuey@xogrp.com>
Date: Thu, 17 Aug 2017 17:26:10 -0400
Subject: [PATCH] When connecting to GitHub Enterprise, force email verified
 field to true

---
 connector/github/github.go | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/connector/github/github.go b/connector/github/github.go
index c3111cbe..2a8b216e 100644
--- a/connector/github/github.go
+++ b/connector/github/github.go
@@ -503,6 +503,11 @@ func (c *githubConnector) userEmail(ctx context.Context, client *http.Client) (s
 		}
 
 		for _, email := range emails {
+			// if GitHub Enterprise, set email.Verified to true
+			if c.hostName != "" {
+				email.Verified = true
+			}
+			
 			if email.Verified && email.Primary {
 				return email.Email, nil
 			}
-- 
GitLab