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/06/23 15:15:32 UTC

[GitHub] [incubator-devlake] SnowMoon-Dev opened a new pull request, #2340: [Refactor][Gitee] use GetDal instead of deprecated GetDb

SnowMoon-Dev opened a new pull request, #2340:
URL: https://github.com/apache/incubator-devlake/pull/2340

   # Summary
   Implement the gittee plugin,
   
   ### Does this close any open issues?
   close [#2338](https://github.com/apache/incubator-devlake/issues/2339)
   
   ### Screenshots
   
   
   <img width="644" alt="image" src="https://user-images.githubusercontent.com/42627702/175333759-0942fb92-7c11-426a-9b06-ff448bd5d3fa.png">
   
   
   
   ### 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] SnowMoon-Dev commented on a diff in pull request #2340: [Refactor][Gitee] use GetDal instead of deprecated GetDb

Posted by GitBox <gi...@apache.org>.
SnowMoon-Dev commented on code in PR #2340:
URL: https://github.com/apache/incubator-devlake/pull/2340#discussion_r905866461


##########
models/domainlayer/didgen/domain_id_generator.go:
##########
@@ -88,19 +88,30 @@ func NewDomainIdGenerator(entityPtr interface{}) *DomainIdGenerator {
 
 func (g *DomainIdGenerator) Generate(pkValues ...interface{}) string {
 	id := g.prefix
-	for i, pkValue := range pkValues {
+	isMatch := false
+
+	for _, pkValue := range pkValues {
 		// append pk
 		id += ":" + fmt.Sprintf("%v", pkValue)
 		// type checking
 		pkValueType := reflect.TypeOf(pkValue)
 		if pkValueType == wildcardType {
 			break
-		} else if pkValueType != g.pkTypes[i] {
-			panic(fmt.Errorf("primary key type does not match: %s should be %s",
-				g.pkNames[i],
-				g.pkTypes[i].Name(),
+		}
+
+		for _, pkType := range g.pkTypes {

Review Comment:
   My problem, I didn't add connectId to generate domainRepoId



-- 
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 merged pull request #2340: [Refactor][Gitee] use GetDal instead of deprecated GetDb

Posted by GitBox <gi...@apache.org>.
klesh merged PR #2340:
URL: https://github.com/apache/incubator-devlake/pull/2340


-- 
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] SnowMoon-Dev commented on a diff in pull request #2340: [Refactor][Gitee] use GetDal instead of deprecated GetDb

Posted by GitBox <gi...@apache.org>.
SnowMoon-Dev commented on code in PR #2340:
URL: https://github.com/apache/incubator-devlake/pull/2340#discussion_r905866716


##########
models/domainlayer/didgen/domain_id_generator.go:
##########
@@ -88,19 +88,30 @@ func NewDomainIdGenerator(entityPtr interface{}) *DomainIdGenerator {
 
 func (g *DomainIdGenerator) Generate(pkValues ...interface{}) string {
 	id := g.prefix
-	for i, pkValue := range pkValues {
+	isMatch := false
+
+	for _, pkValue := range pkValues {
 		// append pk
 		id += ":" + fmt.Sprintf("%v", pkValue)
 		// type checking
 		pkValueType := reflect.TypeOf(pkValue)
 		if pkValueType == wildcardType {
 			break
-		} else if pkValueType != g.pkTypes[i] {
-			panic(fmt.Errorf("primary key type does not match: %s should be %s",
-				g.pkNames[i],
-				g.pkTypes[i].Name(),
+		}
+
+		for _, pkType := range g.pkTypes {

Review Comment:
   i will fix it



-- 
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 #2340: [Refactor][Gitee] use GetDal instead of deprecated GetDb

Posted by GitBox <gi...@apache.org>.
klesh commented on code in PR #2340:
URL: https://github.com/apache/incubator-devlake/pull/2340#discussion_r905808488


##########
models/domainlayer/didgen/domain_id_generator.go:
##########
@@ -88,19 +88,30 @@ func NewDomainIdGenerator(entityPtr interface{}) *DomainIdGenerator {
 
 func (g *DomainIdGenerator) Generate(pkValues ...interface{}) string {
 	id := g.prefix
-	for i, pkValue := range pkValues {
+	isMatch := false
+
+	for _, pkValue := range pkValues {
 		// append pk
 		id += ":" + fmt.Sprintf("%v", pkValue)
 		// type checking
 		pkValueType := reflect.TypeOf(pkValue)
 		if pkValueType == wildcardType {
 			break
-		} else if pkValueType != g.pkTypes[i] {
-			panic(fmt.Errorf("primary key type does not match: %s should be %s",
-				g.pkNames[i],
-				g.pkTypes[i].Name(),
+		}
+
+		for _, pkType := range g.pkTypes {

Review Comment:
   I don't think this is correct. Would you mind explaining why you did it?



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