diff options
author | Amine Hilaly <hilalyamine@gmail.com> | 2019-06-22 17:10:23 +0200 |
---|---|---|
committer | Amine Hilaly <hilalyamine@gmail.com> | 2019-06-24 21:32:11 +0200 |
commit | f70c279c1e8dc7f73e08679f8789c35c1dfdd59d (patch) | |
tree | 829aefab46f5f9d3b6cdf282ef776e901071cf02 /bridge/github/export_query.go | |
parent | e511f3d885e5e7f15d3b7f8e500380f0c63bc377 (diff) | |
download | git-bug-f70c279c1e8dc7f73e08679f8789c35c1dfdd59d.tar.gz |
[bridge/github] exporter: Improve error handling
[bridge/github] queries: use api v4 for getLabel / createLabel
[bridge/github] add comments to getIdentityClient
Diffstat (limited to 'bridge/github/export_query.go')
-rw-r--r-- | bridge/github/export_query.go | 17 |
1 files changed, 17 insertions, 0 deletions
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"` +} |