abeizn commented on code in PR #6146:
URL:
https://github.com/apache/incubator-devlake/pull/6146#discussion_r1338232056
##########
backend/test/helper/client.go:
##########
@@ -289,12 +289,13 @@ func (d *DevlakeClient) initPlugins(cfg
*LocalClientConfig) {
for _, p := range cfg.Plugins {
require.NoError(d.testCtx, plugin.RegisterPlugin(p.Name(), p))
}
- for _, p := range plugin.AllPlugins() {
- if pi, ok := p.(plugin.PluginInit); ok {
- err := pi.Init(d.basicRes)
- require.NoError(d.testCtx, err)
- }
- }
+ // The following code doesn't seem correct, plugin should be
initialized by the server, not the client
Review Comment:
Delete it, or keep it
##########
backend/plugins/github/api/scope_api.go:
##########
@@ -106,5 +97,6 @@ func GetScope(input *plugin.ApiResourceInput)
(*plugin.ApiResourceOutput, errors
// @Failure 500 {object} shared.ApiBody "Internal Error"
// @Router /plugins/github/connections/{connectionId}/scopes/{scopeId} [DELETE]
func DeleteScope(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput,
errors.Error) {
- return scopeHelper.Delete(input)
+ println("hello delete scope")
Review Comment:
please detele it
##########
backend/plugins/github/api/scope_config_api.go:
##########
@@ -49,8 +51,10 @@ func CreateScopeConfig(input *plugin.ApiResourceInput)
(*plugin.ApiResourceOutpu
// @Failure 400 {object} shared.ApiBody "Bad Request"
// @Failure 500 {object} shared.ApiBody "Internal Error"
// @Router /plugins/github/connections/{connectionId}/scope-configs/{id}
[PATCH]
-func UpdateScopeConfig(input *plugin.ApiResourceInput)
(*plugin.ApiResourceOutput, errors.Error) {
- return scHelper.Update(input)
+func PatchScopeConfig(input *plugin.ApiResourceInput)
(*plugin.ApiResourceOutput, errors.Error) {
+ println("api hello")
+ fmt.Printf("api patch scope confg %v\n", input.Params)
Review Comment:
same above
##########
backend/plugins/github/api/scope_config_api.go:
##########
@@ -49,8 +51,10 @@ func CreateScopeConfig(input *plugin.ApiResourceInput)
(*plugin.ApiResourceOutpu
// @Failure 400 {object} shared.ApiBody "Bad Request"
// @Failure 500 {object} shared.ApiBody "Internal Error"
// @Router /plugins/github/connections/{connectionId}/scope-configs/{id}
[PATCH]
-func UpdateScopeConfig(input *plugin.ApiResourceInput)
(*plugin.ApiResourceOutput, errors.Error) {
- return scHelper.Update(input)
+func PatchScopeConfig(input *plugin.ApiResourceInput)
(*plugin.ApiResourceOutput, errors.Error) {
+ println("api hello")
Review Comment:
please delete 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]