From 8dec5e50878bc8928664337e1cd82a37860bcb58 Mon Sep 17 00:00:00 2001 From: artaasadi Date: Wed, 20 Nov 2024 18:36:53 +0100 Subject: [PATCH] fix: fix get function --- command/cmd/getDescriber.go | 9 +++++++-- pkg/describer/resources.go | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/command/cmd/getDescriber.go b/command/cmd/getDescriber.go index c102564e..35ef690d 100644 --- a/command/cmd/getDescriber.go +++ b/command/cmd/getDescriber.go @@ -22,6 +22,7 @@ import ( var ( resourceID string + PatToken = os.Getenv("PAT_TOKEN") ) // getDescriberCmd represents the describer command @@ -51,8 +52,12 @@ var getDescriberCmd = &cobra.Command{ ctx := context.Background() logger, _ := zap.NewProduction() - // TODO: Set the credentials - creds := configs.IntegrationCredentials{} + creds, err := provider.AccountCredentialsFromMap(map[string]any{ + "pat_token": PatToken, + }) + if err != nil { + return fmt.Errorf(" account credentials: %w", err) + } additionalParameters, err := provider.GetAdditionalParameters(job) if err != nil { diff --git a/pkg/describer/resources.go b/pkg/describer/resources.go index 8d0f4e33..347c0a55 100755 --- a/pkg/describer/resources.go +++ b/pkg/describer/resources.go @@ -94,5 +94,5 @@ func describeSingle(ctx context.Context, logger *zap.Logger, accountCfg configs. } ctx = describer.WithLogger(ctx, logger) - return resourceTypeObject.GetDescriber(ctx, accountCfg, triggerType, resourceID, additionalParameters) + return resourceTypeObject.GetDescriber(ctx, accountCfg, triggerType, additionalParameters, resourceID, stream) }