You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by wa...@apache.org on 2022/05/26 12:05:16 UTC
[incubator-devlake] 03/06: core->helper
This is an automated email from the ASF dual-hosted git repository.
warren pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
commit 479cebd3661f46af39414fe439469ca8ab11e7bb
Author: tgp <13...@163.com>
AuthorDate: Wed May 25 20:24:55 2022 +0800
core->helper
---
plugins/gitlab/tasks/issue_extractor.go | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/plugins/gitlab/tasks/issue_extractor.go b/plugins/gitlab/tasks/issue_extractor.go
index 90ac3960..1c083e84 100644
--- a/plugins/gitlab/tasks/issue_extractor.go
+++ b/plugins/gitlab/tasks/issue_extractor.go
@@ -25,8 +25,8 @@ type IssuesResponse struct {
Iid int
Id int
Title string
- CreatedAt *core.Iso8601Time
- UpdatedAt *core.Iso8601Time
+ CreatedAt helper.Iso8601Time
+ UpdatedAt helper.Iso8601Time
}
Author struct{
State string
@@ -62,9 +62,9 @@ type IssuesResponse struct {
MergeRequestsCount int
Id int
Title string
- GitlabUpdatedAt core.Iso8601Time `json:"updated_at"`
- GitlabCreatedAt core.Iso8601Time `json:"created_at"`
- GitlabClosedAt *core.Iso8601Time `json:"closed_at"`
+ GitlabUpdatedAt helper.Iso8601Time `json:"updated_at"`
+ GitlabCreatedAt helper.Iso8601Time `json:"created_at"`
+ GitlabClosedAt *helper.Iso8601Time `json:"closed_at"`
ClosedBy struct{
State string
WebUrl string
@@ -74,7 +74,7 @@ type IssuesResponse struct {
Name string
}
UserNotesCount int
- DueDate *core.Iso8601Time
+ DueDate helper.Iso8601Time
WebUrl string `json:"web_url"`
References struct {
Short string
@@ -176,7 +176,7 @@ func convertGitlabIssue(issue *IssuesResponse, projectId int) (*models.GitlabIss
Title: issue.Title,
Body: issue.Description,
Url: issue.Links.Self,
- ClosedAt: core.Iso8601TimeToTime(issue.GitlabClosedAt),
+ ClosedAt: helper.Iso8601TimeToTime(issue.GitlabClosedAt),
GitlabCreatedAt: issue.GitlabCreatedAt.ToTime(),
GitlabUpdatedAt: issue.GitlabUpdatedAt.ToTime(),
}