From db43096129a81275af6f76a33e6b663c8a4a1aa2 Mon Sep 17 00:00:00 2001 From: Ice3man Date: Fri, 13 Sep 2024 23:43:03 +0530 Subject: [PATCH] bugfix: fixed misc issues with linear integration --- pkg/reporting/trackers/linear/linear.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkg/reporting/trackers/linear/linear.go b/pkg/reporting/trackers/linear/linear.go index 1ad9552f26..11712039f8 100644 --- a/pkg/reporting/trackers/linear/linear.go +++ b/pkg/reporting/trackers/linear/linear.go @@ -109,7 +109,9 @@ func (i *Integration) CreateIssue(event *output.ResultEvent) (*filters.CreateIss "issueID": types.ToString(existingIssue.ID), } var resp struct { - LastSyncID string `json:"lastSyncId"` + IssueUpdate struct { + LastSyncID int `json:"lastSyncId"` + } } err := i.doGraphqlRequest(ctx, existingIssueUpdateStateMutation, &resp, variables, "IssueUpdate") if err != nil { @@ -125,7 +127,9 @@ func (i *Integration) CreateIssue(event *output.ResultEvent) (*filters.CreateIss "commentCreateInput": commentInput, } var resp struct { - LastSyncID string `json:"lastSyncId"` + CommentCreate struct { + LastSyncID int `json:"lastSyncId"` + } } err := i.doGraphqlRequest(ctx, commentCreateExistingTicketMutation, &resp, variables, "CommentCreate") if err != nil { @@ -387,6 +391,7 @@ func (i *Integration) doGraphqlRequest(ctx context.Context, query string, v any, Errors errorsGraphql //Extensions any // Unused. } + err = json.NewDecoder(resp.Body).Decode(&out) if err != nil { return err