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/11/09 04:25:03 UTC
[GitHub] [incubator-devlake] abeizn opened a new pull request, #3703: feat: modifity refs-commits-diffs name and struct
abeizn opened a new pull request, #3703:
URL: https://github.com/apache/incubator-devlake/pull/3703
### ⚠️ Pre Checklist
> Please complete _ALL_ items in this checklist, and remove before submitting
- [ ] I have read through the [Contributing Documentation](https://devlake.apache.org/community/).
- [ ] I have added relevant tests.
- [ ] I have added relevant documentation.
- [ ] I will add labels to the PR, such as `pr-type/bug-fix`, `pr-type/feature-development`, etc.
# Summary
<!--
Thanks for submitting a pull request!
We appreciate you spending the time to work on these changes.
Please fill out as many sections below as possible.
-->
### Does this close any open issues?
Closes xx
### Screenshots
Include any relevant screenshots here.
### 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] klesh commented on a diff in pull request #3703: feat: modifity refs_commits_diffs table name and struct
Posted by GitBox <gi...@apache.org>.
klesh commented on code in PR #3703:
URL: https://github.com/apache/incubator-devlake/pull/3703#discussion_r1017674630
##########
models/migrationscripts/20221109_modfiy_commits_diffs.go:
##########
@@ -0,0 +1,99 @@
+/*
+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 (
+ "github.com/apache/incubator-devlake/errors"
+ "github.com/apache/incubator-devlake/helpers/migrationhelper"
+ "github.com/apache/incubator-devlake/plugins/core"
+)
+
+var _ core.MigrationScript = (*modifyCommitsDiffs)(nil)
+
+type modifyCommitsDiffs struct{}
+
+// initial format
+type RefsCommitsDiff20221109 struct {
+ NewRefId string `gorm:"primaryKey;type:varchar(255)"`
+ OldRefId string `gorm:"primaryKey;type:varchar(255)"`
+ CommitSha string `gorm:"primaryKey;type:varchar(40)"`
+ NewRefCommitSha string `gorm:"type:varchar(40)"`
+ OldRefCommitSha string `gorm:"type:varchar(40)"`
+ SortingIndex int
+}
+
+func (RefsCommitsDiff20221109) TableName() string {
+ return "refs_commits_diffs"
+}
+
+// updated format
+
+type CommitsStatus20221109 struct {
+ NewRefCommitSha string `gorm:"primaryKey;type:varchar(40)"`
Review Comment:
`Ref` represent `tag`/`branch`, not needed anymore.
The same apply to the rest of the source code
##########
models/migrationscripts/20221109_modfiy_commits_diffs.go:
##########
@@ -0,0 +1,99 @@
+/*
+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 (
+ "github.com/apache/incubator-devlake/errors"
+ "github.com/apache/incubator-devlake/helpers/migrationhelper"
+ "github.com/apache/incubator-devlake/plugins/core"
+)
+
+var _ core.MigrationScript = (*modifyCommitsDiffs)(nil)
+
+type modifyCommitsDiffs struct{}
+
+// initial format
+type RefsCommitsDiff20221109 struct {
Review Comment:
What does it do? I don't see any references to this struct.
--
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 #3703: feat: modifity refs_commits_diffs table name and struct
Posted by GitBox <gi...@apache.org>.
abeizn commented on code in PR #3703:
URL: https://github.com/apache/incubator-devlake/pull/3703#discussion_r1017678873
##########
models/migrationscripts/20221109_modfiy_commits_diffs.go:
##########
@@ -0,0 +1,99 @@
+/*
+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 (
+ "github.com/apache/incubator-devlake/errors"
+ "github.com/apache/incubator-devlake/helpers/migrationhelper"
+ "github.com/apache/incubator-devlake/plugins/core"
+)
+
+var _ core.MigrationScript = (*modifyCommitsDiffs)(nil)
+
+type modifyCommitsDiffs struct{}
+
+// initial format
+type RefsCommitsDiff20221109 struct {
+ NewRefId string `gorm:"primaryKey;type:varchar(255)"`
+ OldRefId string `gorm:"primaryKey;type:varchar(255)"`
+ CommitSha string `gorm:"primaryKey;type:varchar(40)"`
+ NewRefCommitSha string `gorm:"type:varchar(40)"`
+ OldRefCommitSha string `gorm:"type:varchar(40)"`
+ SortingIndex int
+}
+
+func (RefsCommitsDiff20221109) TableName() string {
+ return "refs_commits_diffs"
+}
+
+// updated format
+
+type CommitsStatus20221109 struct {
+ NewRefCommitSha string `gorm:"primaryKey;type:varchar(40)"`
Review Comment:
i forgot the name, i will update `NewRefCommitSha` to `NewCommitSha`, same to OldRefCommitSha
--
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] mindlesscloud merged pull request #3703: feat: modify refs_commits_diffs table name and struct
Posted by GitBox <gi...@apache.org>.
mindlesscloud merged PR #3703:
URL: https://github.com/apache/incubator-devlake/pull/3703
--
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 #3703: feat: modifity refs_commits_diffs table name and struct
Posted by GitBox <gi...@apache.org>.
abeizn commented on code in PR #3703:
URL: https://github.com/apache/incubator-devlake/pull/3703#discussion_r1017676416
##########
models/migrationscripts/20221109_modfiy_commits_diffs.go:
##########
@@ -0,0 +1,99 @@
+/*
+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 (
+ "github.com/apache/incubator-devlake/errors"
+ "github.com/apache/incubator-devlake/helpers/migrationhelper"
+ "github.com/apache/incubator-devlake/plugins/core"
+)
+
+var _ core.MigrationScript = (*modifyCommitsDiffs)(nil)
+
+type modifyCommitsDiffs struct{}
+
+// initial format
+type RefsCommitsDiff20221109 struct {
Review Comment:
This is what I added on purpose, in order to see the structure of the previous table
--
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 #3703: feat: modifity refs_commits_diffs table name and struct
Posted by GitBox <gi...@apache.org>.
abeizn commented on code in PR #3703:
URL: https://github.com/apache/incubator-devlake/pull/3703#discussion_r1017678873
##########
models/migrationscripts/20221109_modfiy_commits_diffs.go:
##########
@@ -0,0 +1,99 @@
+/*
+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 (
+ "github.com/apache/incubator-devlake/errors"
+ "github.com/apache/incubator-devlake/helpers/migrationhelper"
+ "github.com/apache/incubator-devlake/plugins/core"
+)
+
+var _ core.MigrationScript = (*modifyCommitsDiffs)(nil)
+
+type modifyCommitsDiffs struct{}
+
+// initial format
+type RefsCommitsDiff20221109 struct {
+ NewRefId string `gorm:"primaryKey;type:varchar(255)"`
+ OldRefId string `gorm:"primaryKey;type:varchar(255)"`
+ CommitSha string `gorm:"primaryKey;type:varchar(40)"`
+ NewRefCommitSha string `gorm:"type:varchar(40)"`
+ OldRefCommitSha string `gorm:"type:varchar(40)"`
+ SortingIndex int
+}
+
+func (RefsCommitsDiff20221109) TableName() string {
+ return "refs_commits_diffs"
+}
+
+// updated format
+
+type CommitsStatus20221109 struct {
+ NewRefCommitSha string `gorm:"primaryKey;type:varchar(40)"`
Review Comment:
i forgot update the name, i will update `NewRefCommitSha` to `NewCommitSha`, same to OldRefCommitSha
##########
models/migrationscripts/20221109_modfiy_commits_diffs.go:
##########
@@ -0,0 +1,99 @@
+/*
+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 (
+ "github.com/apache/incubator-devlake/errors"
+ "github.com/apache/incubator-devlake/helpers/migrationhelper"
+ "github.com/apache/incubator-devlake/plugins/core"
+)
+
+var _ core.MigrationScript = (*modifyCommitsDiffs)(nil)
+
+type modifyCommitsDiffs struct{}
+
+// initial format
+type RefsCommitsDiff20221109 struct {
+ NewRefId string `gorm:"primaryKey;type:varchar(255)"`
+ OldRefId string `gorm:"primaryKey;type:varchar(255)"`
+ CommitSha string `gorm:"primaryKey;type:varchar(40)"`
+ NewRefCommitSha string `gorm:"type:varchar(40)"`
+ OldRefCommitSha string `gorm:"type:varchar(40)"`
+ SortingIndex int
+}
+
+func (RefsCommitsDiff20221109) TableName() string {
+ return "refs_commits_diffs"
+}
+
+// updated format
+
+type CommitsStatus20221109 struct {
+ NewRefCommitSha string `gorm:"primaryKey;type:varchar(40)"`
Review Comment:
i forgot to update the name, i will update `NewRefCommitSha` to `NewCommitSha`, same to OldRefCommitSha
--
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