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

[GitHub] [incubator-devlake] likyh opened a new pull request, #4891: fix: fix test connection in teambition

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

   ### Summary
   
   1. fix test connection in teambition list page
   
   ![image](https://user-images.githubusercontent.com/3294100/230941831-93078ca8-6813-401a-b1b1-b22fab0e5143.png)
   
   2. fix test when appid is wrong
   ![image](https://user-images.githubusercontent.com/3294100/230941932-e2c25190-8de4-498a-8bf9-1aa2fc8eacb5.png)
   
   
   ### Does this close any open issues?
   Closes #4890 
   


-- 
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] likyh commented on a diff in pull request #4891: fix: fix test connection in teambition

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


##########
backend/plugins/teambition/api/connection.go:
##########
@@ -70,7 +70,7 @@ func TestConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput,
 		return nil, err
 	}
 	if resBody.Code != http.StatusOK {
-		return nil, errors.HttpStatus(res.StatusCode).New(fmt.Sprintf("unexpected status code: %d", res.StatusCode))
+		return nil, errors.HttpStatus(resBody.Code).New(fmt.Sprintf("unexpected code: %d, %s", resBody.Code, resBody.ErrorMessage))

Review Comment:
   Emm, no doc found



-- 
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] likyh commented on pull request #4891: fix: fix test connection in teambition

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

   @coldgust Hi, I fix a bug in teambition. Need your review.


-- 
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] coldgust commented on pull request #4891: fix: fix test connection in teambition

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

   LGTM


-- 
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] likyh commented on pull request #4891: fix: fix test connection in teambition

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

   https://github.com/apache/incubator-devlake/pull/5066


-- 
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 #4891: fix: fix test connection in teambition

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


##########
backend/plugins/teambition/api/connection.go:
##########
@@ -70,7 +70,7 @@ func TestConnection(input *plugin.ApiResourceInput) (*plugin.ApiResourceOutput,
 		return nil, err
 	}
 	if resBody.Code != http.StatusOK {
-		return nil, errors.HttpStatus(res.StatusCode).New(fmt.Sprintf("unexpected status code: %d", res.StatusCode))
+		return nil, errors.HttpStatus(resBody.Code).New(fmt.Sprintf("unexpected code: %d, %s", resBody.Code, resBody.ErrorMessage))

Review Comment:
   Can you provide the doc link to support that `resBody.Code` is in fact a `HttpStatusCode`?



-- 
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] likyh closed pull request #4891: fix: fix test connection in teambition

Posted by "likyh (via GitHub)" <gi...@apache.org>.
likyh closed pull request #4891: fix: fix test connection in teambition
URL: https://github.com/apache/incubator-devlake/pull/4891


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