You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by kl...@apache.org on 2022/06/21 07:38:07 UTC
[incubator-devlake] branch main updated: fix github cannot be test (#2277)
This is an automated email from the ASF dual-hosted git repository.
klesh 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 4da535a6 fix github cannot be test (#2277)
4da535a6 is described below
commit 4da535a6a03e7e9521a3ce428f64767c5370b6c1
Author: likyh <l...@likyh.com>
AuthorDate: Tue Jun 21 15:38:04 2022 +0800
fix github cannot be test (#2277)
Co-authored-by: linyh <ya...@meri.co>
---
plugins/github/api/connection.go | 2 +-
plugins/github/models/connection.go | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/plugins/github/api/connection.go b/plugins/github/api/connection.go
index 0e468dc4..db439ef5 100644
--- a/plugins/github/api/connection.go
+++ b/plugins/github/api/connection.go
@@ -44,7 +44,7 @@ func TestConnection(input *core.ApiResourceInput) (*core.ApiResourceOutput, erro
if err != nil {
return nil, err
}
- tokens := strings.Split(params.Auth, ",")
+ tokens := strings.Split(params.Token, ",")
// verify multiple token in parallel
// PLEASE NOTE: This works because GitHub API Client rotates tokens on each request
diff --git a/plugins/github/models/connection.go b/plugins/github/models/connection.go
index 4b8bb3a5..516a9c1f 100644
--- a/plugins/github/models/connection.go
+++ b/plugins/github/models/connection.go
@@ -21,7 +21,7 @@ import "github.com/apache/incubator-devlake/plugins/helper"
type TestConnectionRequest struct {
Endpoint string `json:"endpoint" validate:"required,url"`
- Auth string `json:"auth" validate:"required"`
+ Token string `json:"token" validate:"required"`
Proxy string `json:"proxy"`
}