You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by GitBox <gi...@apache.org> on 2022/07/07 09:49:29 UTC

[GitHub] [incubator-devlake] likyh commented on a diff in pull request #2215: [feat-1022][github]: Support GitHub Milestones

likyh commented on code in PR #2215:
URL: https://github.com/apache/incubator-devlake/pull/2215#discussion_r915683169


##########
plugins/github/tasks/issue_extractor.go:
##########
@@ -233,13 +155,122 @@ func convertGithubIssue(issue *IssuesResponse, connectionId uint64, repositoryId
 		Title:           issue.Title,
 		Body:            string(issue.Body),
 		Url:             issue.HtmlUrl,
+		MilestoneId:     issue.Milestone.Id,
 		ClosedAt:        helper.Iso8601TimeToTime(issue.ClosedAt),
 		GithubCreatedAt: issue.GithubCreatedAt.ToTime(),
 		GithubUpdatedAt: issue.GithubUpdatedAt.ToTime(),
 	}
+	if issue.Assignee != nil {
+		githubIssue.AssigneeId = issue.Assignee.Id
+		githubIssue.AssigneeName = issue.Assignee.Login
+	}
+	if issue.User != nil {
+		githubIssue.AuthorId = issue.User.Id
+		githubIssue.AuthorName = issue.User.Login
+	}
 	if issue.ClosedAt != nil {
 		githubIssue.LeadTimeMinutes = uint(issue.ClosedAt.ToTime().Sub(issue.GithubCreatedAt.ToTime()).Minutes())
 	}
-
+	if issue.Assignee != nil {
+		githubIssue.AssigneeId = issue.Assignee.Id
+		githubIssue.AssigneeName = issue.Assignee.Login
+	}
+	if issue.User != nil {
+		githubIssue.AuthorId = issue.User.Id
+		githubIssue.AuthorName = issue.User.Login
+	}

Review Comment:
   duplicate with Line 163~170



-- 
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: commits-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org