warren830 commented on code in PR #1968:
URL: https://github.com/apache/incubator-devlake/pull/1968#discussion_r881710799


##########
plugins/gitlab/tasks/issue_extractor.go:
##########
@@ -0,0 +1,193 @@
+package tasks
+
+import (
+       "encoding/json"
+       "github.com/apache/incubator-devlake/plugins/core"
+
+       "github.com/apache/incubator-devlake/plugins/gitlab/models"
+       "github.com/apache/incubator-devlake/plugins/helper"
+)
+
+var ExtractApiIssuesMeta = core.SubTaskMeta{
+       Name:             "extractApiIssues",
+       EntryPoint:       ExtractApiIssues,
+       EnabledByDefault: true,
+       Description:      "Extract raw Issues data into tool layer table 
gitlab_issues",
+}
+
+type IssuesResponse struct {
+       ProjectId    int `json:"id"`
+       Milestone    struct {
+               Due_date        string
+               Project_id      int
+               State           string
+               Description string
+               Iid             int
+               Id                      int
+               Title           string
+               CreatedAt helper.Iso8601Time
+               UpdatedAt helper.Iso8601Time
+       }
+       Author struct{
+               State           string
+               WebUrl          string
+               AvatarUrl       string
+               Username        string
+               Id                      int
+               Name            string
+       }
+       Description     string
+       State                   string
+       Iid                     int
+       Assignees []struct {
+               AvatarUrl       string
+               WebUrl          string
+               State           string
+               Username        string
+               Id                      int
+               Name            string
+       }
+       Assignee *struct {
+               AvatarUrl       string
+               WebUrl          string
+               State           string
+               Username        string
+               Id                      int
+               Name            string
+       }
+       Type                            string
+       Labels                          []string `json:"labels"`
+       UpVotes                         int
+       DownVotes                       int
+       MergeRequestsCount      int
+       Id                                      int
+       Title                   string
+       GitlabUpdatedAt helper.Iso8601Time  `json:"updated_at"`
+       GitlabCreatedAt helper.Iso8601Time  `json:"created_at"`
+       GitlabClosedAt  *helper.Iso8601Time `json:"closed_at"`
+       ClosedBy struct{
+               State           string
+               WebUrl          string
+               AvatarUrl       string
+               Username        string
+               Id                      int
+               Name            string
+       }
+       UserNotesCount int
+       DueDate helper.Iso8601Time
+       WebUrl string   `json:"web_url"`
+       References struct {
+               Short           string
+               Relative        string
+               Full            string
+       }
+       TimeStats struct {
+               TimeEstimate            int
+               TotalTimeSpent          int

Review Comment:
   similar to above



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to