From f70c279c1e8dc7f73e08679f8789c35c1dfdd59d Mon Sep 17 00:00:00 2001 From: Amine Hilaly Date: Sat, 22 Jun 2019 17:10:23 +0200 Subject: [bridge/github] exporter: Improve error handling [bridge/github] queries: use api v4 for getLabel / createLabel [bridge/github] add comments to getIdentityClient --- bridge/github/import_query.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'bridge/github/import_query.go') diff --git a/bridge/github/import_query.go b/bridge/github/import_query.go index 4d5886f6..6c0db5e1 100644 --- a/bridge/github/import_query.go +++ b/bridge/github/import_query.go @@ -168,3 +168,11 @@ type userQuery struct { Email githubv4.String } `graphql:"user(login: $login)"` } + +type labelQuery struct { + Repository struct { + Label struct { + ID string `graphql:"id"` + } `graphql:"label(name: $name)"` + } `graphql:"repository(owner: $owner, name: $name)"` +} -- cgit From 12cc74e22b35d08d2d342a1b445d967e3e09c1f6 Mon Sep 17 00:00:00 2001 From: Amine Hilaly Date: Sat, 22 Jun 2019 22:28:04 +0200 Subject: [bridge/github] correct label & comment edit mutations bugs --- bridge/github/import_query.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bridge/github/import_query.go') diff --git a/bridge/github/import_query.go b/bridge/github/import_query.go index 6c0db5e1..34931c7d 100644 --- a/bridge/github/import_query.go +++ b/bridge/github/import_query.go @@ -173,6 +173,6 @@ type labelQuery struct { Repository struct { Label struct { ID string `graphql:"id"` - } `graphql:"label(name: $name)"` + } `graphql:"label(name: $label)"` } `graphql:"repository(owner: $owner, name: $name)"` } -- cgit From 9e611ee66787b9f005540395da2ea10b3320362c Mon Sep 17 00:00:00 2001 From: Amine Hilaly Date: Sat, 6 Jul 2019 11:46:59 +0200 Subject: [bridge/github] import: avoid retrieving ghost email in userQuery request rename userQuery to ghostQuery --- bridge/github/import_query.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'bridge/github/import_query.go') diff --git a/bridge/github/import_query.go b/bridge/github/import_query.go index 34931c7d..89d7859d 100644 --- a/bridge/github/import_query.go +++ b/bridge/github/import_query.go @@ -160,12 +160,11 @@ type commentEditQuery struct { } `graphql:"repository(owner: $owner, name: $name)"` } -type userQuery struct { +type ghostQuery struct { User struct { Login githubv4.String AvatarUrl githubv4.String Name *githubv4.String - Email githubv4.String } `graphql:"user(login: $login)"` } -- cgit