Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

Commit 9e611ee

Browse files
committed
[bridge/github] import: avoid retrieving ghost email in userQuery
request rename userQuery to ghostQuery
1 parent 6323c7b commit 9e611ee

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

bridge/github/import.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,7 @@ func (gi *githubImporter) getGhost(repo *cache.RepoCache) (*cache.IdentityCache,
505505
return nil, err
506506
}
507507

508-
var q userQuery
508+
var q ghostQuery
509509

510510
variables := map[string]interface{}{
511511
"login": githubv4.String("ghost"),
@@ -529,7 +529,7 @@ func (gi *githubImporter) getGhost(repo *cache.RepoCache) (*cache.IdentityCache,
529529

530530
return repo.NewIdentityRaw(
531531
name,
532-
string(q.User.Email),
532+
"",
533533
string(q.User.Login),
534534
string(q.User.AvatarUrl),
535535
map[string]string{

bridge/github/import_query.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -160,12 +160,11 @@ type commentEditQuery struct {
160160
} `graphql:"repository(owner: $owner, name: $name)"`
161161
}
162162

163-
type userQuery struct {
163+
type ghostQuery struct {
164164
User struct {
165165
Login githubv4.String
166166
AvatarUrl githubv4.String
167167
Name *githubv4.String
168-
Email githubv4.String
169168
} `graphql:"user(login: $login)"`
170169
}
171170

0 commit comments

Comments
 (0)