You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by ab...@apache.org on 2022/10/21 07:01:40 UTC
[incubator-devlake] branch main updated: fix: test connection response with 500 (#3524)
This is an automated email from the ASF dual-hosted git repository.
abeizn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/main by this push:
new 545d484c7 fix: test connection response with 500 (#3524)
545d484c7 is described below
commit 545d484c70a11474c7a37e954dfd85f5284d03e5
Author: mindlesscloud <li...@merico.dev>
AuthorDate: Fri Oct 21 15:01:35 2022 +0800
fix: test connection response with 500 (#3524)
---
plugins/bitbucket/api/connection.go | 6 ------
plugins/bitbucket/models/connection.go | 8 --------
2 files changed, 14 deletions(-)
diff --git a/plugins/bitbucket/api/connection.go b/plugins/bitbucket/api/connection.go
index f7c13242b..857b3bbec 100644
--- a/plugins/bitbucket/api/connection.go
+++ b/plugins/bitbucket/api/connection.go
@@ -63,12 +63,6 @@ func TestConnection(input *core.ApiResourceInput) (*core.ApiResourceOutput, erro
return nil, err
}
- resBody := &models.ApiUserResponse{}
- err = helper.UnmarshalResponse(res, resBody)
- if err != nil {
- return nil, err
- }
-
if res.StatusCode != http.StatusOK {
return nil, errors.HttpStatus(res.StatusCode).New("unexpected status code when testing connection")
}
diff --git a/plugins/bitbucket/models/connection.go b/plugins/bitbucket/models/connection.go
index 5a1accb3a..4becd33b9 100644
--- a/plugins/bitbucket/models/connection.go
+++ b/plugins/bitbucket/models/connection.go
@@ -50,14 +50,6 @@ type TransformationRules struct {
IssueTypeRequirement string `mapstructure:"issueTypeRequirement" json:"issueTypeRequirement"`
}
-type ApiUserResponse struct {
- Username string `json:"username"`
- DisplayName string `json:"display_name"`
- AccountId int `json:"account_id"`
- Uuid string `json:"uuid"`
- AccountStatus string `json:"account_status"`
-}
-
type BitbucketConnection struct {
helper.RestConnection `mapstructure:",squash"`
helper.BasicAuth `mapstructure:",squash"`