You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by "warren830 (via GitHub)" <gi...@apache.org> on 2023/04/20 05:49:17 UTC

[GitHub] [incubator-devlake] warren830 opened a new pull request, #4978: feat(gitlab): add author date

warren830 opened a new pull request, #4978:
URL: https://github.com/apache/incubator-devlake/pull/4978

   ### Summary
   
   Add authored date to mr_commit
   
   ### Does this close any open issues?
   
   part of #4961 
   
   ### Screenshots
   
   ### Other Information
   Any other information that is important to this PR.
   


-- 
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


[GitHub] [incubator-devlake] warren830 commented on a diff in pull request #4978: feat(gitlab): add author date

Posted by "warren830 (via GitHub)" <gi...@apache.org>.
warren830 commented on code in PR #4978:
URL: https://github.com/apache/incubator-devlake/pull/4978#discussion_r1172111784


##########
backend/plugins/gitlab/models/migrationscripts/20230420_add_mr_commit_author_date.go:
##########
@@ -0,0 +1,53 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at

Review Comment:
   fixed



##########
backend/plugins/gitlab/models/mr_commit.go:
##########
@@ -28,9 +29,10 @@ import (
 // Thus a "Merge Request Commit" needs to be considered as distinct from a "Commit"
 
 type GitlabMrCommit struct {
-	ConnectionId   uint64 `gorm:"primaryKey"`
-	CommitSha      string `gorm:"primaryKey;type:varchar(40)"`
-	MergeRequestId int    `gorm:"primaryKey;autoIncrement:false"`
+	ConnectionId       uint64 `gorm:"primaryKey"`
+	CommitSha          string `gorm:"primaryKey;type:varchar(40)"`
+	MergeRequestId     int    `gorm:"primaryKey;autoIncrement:false"`
+	CommitAuthoredDate *time.Time

Review Comment:
   Either is ok, I think



-- 
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


[GitHub] [incubator-devlake] abeizn merged pull request #4978: feat(gitlab): add author date

Posted by "abeizn (via GitHub)" <gi...@apache.org>.
abeizn merged PR #4978:
URL: https://github.com/apache/incubator-devlake/pull/4978


-- 
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


[GitHub] [incubator-devlake] abeizn commented on a diff in pull request #4978: feat(gitlab): add author date

Posted by "abeizn (via GitHub)" <gi...@apache.org>.
abeizn commented on code in PR #4978:
URL: https://github.com/apache/incubator-devlake/pull/4978#discussion_r1172111067


##########
backend/plugins/bitbucket/models/migrationscripts/20230420_add_pr_commit_author_date.go:
##########
@@ -0,0 +1,53 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+    http://www.apache.org/licenses/LICENSE-2.0
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+package migrationscripts
+
+import (
+	"time"
+
+	"github.com/apache/incubator-devlake/core/context"
+	"github.com/apache/incubator-devlake/core/errors"
+	"github.com/apache/incubator-devlake/core/plugin"
+	"github.com/apache/incubator-devlake/helpers/migrationhelper"
+)
+
+var _ plugin.MigrationScript = (*addGitlabCommitAuthoredDate)(nil)
+
+type GitlabMrCommit20230420 struct {

Review Comment:
   bitbucket?



##########
backend/plugins/gitlab/models/migrationscripts/20230420_add_mr_commit_author_date.go:
##########
@@ -0,0 +1,53 @@
+/*
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at

Review Comment:
   lint?



##########
backend/plugins/gitlab/models/mr_commit.go:
##########
@@ -28,9 +29,10 @@ import (
 // Thus a "Merge Request Commit" needs to be considered as distinct from a "Commit"
 
 type GitlabMrCommit struct {
-	ConnectionId   uint64 `gorm:"primaryKey"`
-	CommitSha      string `gorm:"primaryKey;type:varchar(40)"`
-	MergeRequestId int    `gorm:"primaryKey;autoIncrement:false"`
+	ConnectionId       uint64 `gorm:"primaryKey"`
+	CommitSha          string `gorm:"primaryKey;type:varchar(40)"`
+	MergeRequestId     int    `gorm:"primaryKey;autoIncrement:false"`
+	CommitAuthoredDate *time.Time

Review Comment:
   need *?



-- 
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