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

[GitHub] [incubator-devlake] CamilleTeruel opened a new pull request, #5094: 5082 fix patch tx rule

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

   ### Summary
   
   Fix the PATCH endpoint of remote plugin transformation rules API.
   Refactor and add tests
   
   ### Does this close any open issues?
   Closes #5082 


-- 
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] keon94 commented on a diff in pull request #5094: 5082 fix patch tx rule

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


##########
backend/test/helper/api.go:
##########
@@ -134,43 +136,43 @@ func (d *DevlakeClient) ListProjects() apiProject.PaginatedProjects {
 	}, http.MethodGet, fmt.Sprintf("%s/projects", d.Endpoint), nil, nil)
 }
 
-func (d *DevlakeClient) CreateScope(pluginName string, connectionId uint64, scopes ...any) any {
+func (d *DevlakeClient) CreateScope(pluginName string, connectionId uint64, scopes ...any) []Map {

Review Comment:
   Semantically, these generic client APIs are meant to be used in conjunction with the helper.Cast[Type] method, e.g.
   ```helper.Cast[[]AzureDevopsGitRepo](client.CreateScope(azurePlugin, connection.ID, scopes))```
   



-- 
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] keon94 commented on a diff in pull request #5094: 5082 fix patch tx rule

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


##########
backend/test/helper/api.go:
##########
@@ -134,43 +136,43 @@ func (d *DevlakeClient) ListProjects() apiProject.PaginatedProjects {
 	}, http.MethodGet, fmt.Sprintf("%s/projects", d.Endpoint), nil, nil)
 }
 
-func (d *DevlakeClient) CreateScope(pluginName string, connectionId uint64, scopes ...any) any {
+func (d *DevlakeClient) CreateScope(pluginName string, connectionId uint64, scopes ...any) []Map {

Review Comment:
   This is ok, but semantically, these generic client APIs are meant to be used in conjunction with the helper.Cast[Type] method, e.g.
   ```helper.Cast[[]AzureDevopsGitRepo](client.CreateScope(azurePlugin, connection.ID, scopes))```
   



-- 
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] CamilleTeruel commented on a diff in pull request #5094: 5082 fix patch tx rule

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


##########
backend/test/helper/api.go:
##########
@@ -134,43 +136,43 @@ func (d *DevlakeClient) ListProjects() apiProject.PaginatedProjects {
 	}, http.MethodGet, fmt.Sprintf("%s/projects", d.Endpoint), nil, nil)
 }
 
-func (d *DevlakeClient) CreateScope(pluginName string, connectionId uint64, scopes ...any) any {
+func (d *DevlakeClient) CreateScope(pluginName string, connectionId uint64, scopes ...any) []Map {

Review Comment:
   Alright, I removed the test refactor commit and used this helper function instead.



-- 
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] keon94 commented on a diff in pull request #5094: 5082 fix patch tx rule

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


##########
backend/test/helper/api.go:
##########
@@ -134,43 +136,43 @@ func (d *DevlakeClient) ListProjects() apiProject.PaginatedProjects {
 	}, http.MethodGet, fmt.Sprintf("%s/projects", d.Endpoint), nil, nil)
 }
 
-func (d *DevlakeClient) CreateScope(pluginName string, connectionId uint64, scopes ...any) any {
+func (d *DevlakeClient) CreateScope(pluginName string, connectionId uint64, scopes ...any) []Map {

Review Comment:
   Here's how it's looking in my PR (#4906):
   https://github.com/merico-dev/lake/blob/ce59afdf3fbec73060c16f62e062362e737c8371/backend/test/e2e/remote/helper.go#L82



-- 
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] hezyin commented on pull request #5094: 5082 fix patch tx rule

Posted by "hezyin (via GitHub)" <gi...@apache.org>.
hezyin commented on PR #5094:
URL: https://github.com/apache/incubator-devlake/pull/5094#issuecomment-1536954090

   This fix needs to be cherry-picked back to release-v0.17


-- 
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] hezyin merged pull request #5094: 5082 fix patch tx rule

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


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