Skip to content

Commit

Permalink
Merge pull request #7 from opengovern/fix-get-functions
Browse files Browse the repository at this point in the history
fix: fix get function
  • Loading branch information
artaasadi authored Nov 20, 2024
2 parents b48e62a + 8dec5e5 commit 099ebc6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions command/cmd/getDescriber.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (

var (
resourceID string
PatToken = os.Getenv("PAT_TOKEN")
)

// getDescriberCmd represents the describer command
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion pkg/describer/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

0 comments on commit 099ebc6

Please sign in to comment.