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/export_query.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'bridge/github/export_query.go') diff --git a/bridge/github/export_query.go b/bridge/github/export_query.go index a527399e..006d2511 100644 --- a/bridge/github/export_query.go +++ b/bridge/github/export_query.go @@ -1,5 +1,7 @@ package github +import "github.com/shurcooL/githubv4" + type createIssueMutation struct { CreateIssue struct { Issue struct { @@ -36,6 +38,14 @@ type updateIssueCommentMutation struct { } `graphql:"updateIssueComment(input:$input)"` } +type createLabelMutation struct { + CreateLabel struct { + Label struct { + ID string `graphql:"id"` + } `graphql:"label"` + } `graphql:"createLabel(input:{repositoryId: $repositoryId, name: $name, color: $color})"` +} + type removeLabelsFromLabelableMutation struct { AddLabels struct{} `graphql:"removeLabelsFromLabelable(input:$input)"` } @@ -43,3 +53,10 @@ type removeLabelsFromLabelableMutation struct { type addLabelsToLabelableMutation struct { RemoveLabels struct{} `graphql:"addLabelsToLabelable(input:$input)"` } + +type createLabelInput struct { + Color githubv4.String `json:"color"` + Description *githubv4.String `json:"description"` + Name githubv4.String `json:"name"` + RepositoryID githubv4.ID `json:"repositoryId"` +} -- cgit