From ca19ca7f67791b3434db14a4d4c4eb8c7342cb70 Mon Sep 17 00:00:00 2001 From: artaasadi Date: Mon, 18 Nov 2024 16:06:34 +0100 Subject: [PATCH] fix: fix github token in credentials --- .../integration-type/github-account/configs/credentials.go | 2 +- .../integration-type/github-account/github_account.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/services/integration/integration-type/github-account/configs/credentials.go b/services/integration/integration-type/github-account/configs/credentials.go index 826824a4b..7801ab2e3 100644 --- a/services/integration/integration-type/github-account/configs/credentials.go +++ b/services/integration/integration-type/github-account/configs/credentials.go @@ -1,5 +1,5 @@ package configs type IntegrationCredentials struct { - Token string `json:"token"` + PatToken string `json:"pat_token"` } diff --git a/services/integration/integration-type/github-account/github_account.go b/services/integration/integration-type/github-account/github_account.go index fa33f2be1..393142b78 100644 --- a/services/integration/integration-type/github-account/github_account.go +++ b/services/integration/integration-type/github-account/github_account.go @@ -37,7 +37,7 @@ func (i *GithubAccountIntegration) HealthCheck(jsonData []byte, providerId strin name = v } isHealthy, err := healthcheck.GithubIntegrationHealthcheck(healthcheck.Config{ - Token: credentials.Token, + Token: credentials.PatToken, OrganizationName: name, }) return isHealthy, err @@ -51,7 +51,7 @@ func (i *GithubAccountIntegration) DiscoverIntegrations(jsonData []byte) ([]mode } var integrations []models.Integration accounts, err := discovery.GithubIntegrationDiscovery(discovery.Config{ - Token: credentials.Token, + Token: credentials.PatToken, }) for _, a := range accounts { labels := map[string]string{