From 63c23631ea8680f0e8c69e7ada9256d0ceac83e3 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 22 Dec 2024 21:34:38 +0330 Subject: [PATCH 1/3] fixed dockerfile --- provider/describer/artifact_dockerfile.go | 231 +++++----------------- provider/describer/repository.go | 38 ++-- provider/model/model.go | 20 +- 3 files changed, 76 insertions(+), 213 deletions(-) diff --git a/provider/describer/artifact_dockerfile.go b/provider/describer/artifact_dockerfile.go index 3d73c743..14507e41 100644 --- a/provider/describer/artifact_dockerfile.go +++ b/provider/describer/artifact_dockerfile.go @@ -28,6 +28,12 @@ func ListArtifactDockerFiles( organizationName string, stream *models.StreamSender, ) ([]models.Resource, error) { + + repositories, err := getRepositories(ctx, githubClient.RestClient, organizationName) + if err != nil { + return nil, fmt.Errorf("error fetching repositories for org %s: %w", organizationName, err) + } + sdk := resilientbridge.NewResilientBridge() sdk.SetDebug(false) sdk.RegisterProvider("github", adapters.NewGitHubAdapter(githubClient.Token), &resilientbridge.ProviderConfig{ @@ -36,24 +42,6 @@ func ListArtifactDockerFiles( BaseBackoff: time.Second, }) - org := ctx.Value("organization") - orgName := org.(string) - if orgName != "" { - organizationName = orgName - } - - repo := ctx.Value("repository") - repoName := repo.(string) - if repoName != "" { - repoFullName := fmt.Sprintf("%s/%s", organizationName, repoName) - return fetchRepositoryDockerfiles(sdk, repoFullName, stream) - } - - repositories, err := getRepositories(ctx, githubClient.RestClient, organizationName) - if err != nil { - return nil, fmt.Errorf("error fetching repositories for org %s: %w", organizationName, err) - } - var allValues []models.Resource totalCollected := 0 perPage := 100 @@ -105,46 +93,25 @@ func ListArtifactDockerFiles( } for _, item := range result.Items { - // Use item.Sha to link to a specific commit version of the file - dockerfileURI := fmt.Sprintf("https://github.com/%s/blob/%s/%s", - item.Repository.FullName, - item.Sha, - item.Path) - - resource := models.Resource{ - ID: dockerfileURI, - Name: item.Name, - Description: JSONAllFieldsMarshaller{ - Value: model.ArtifactDockerFileDescription{ - Sha: item.Sha, - Name: item.Name, - Path: item.Path, - GitURL: item.GitURL, - HTMLURL: item.HTMLURL, - URI: dockerfileURI, - Repository: map[string]interface{}{ - "id": item.Repository.ID, - "node_id": item.Repository.NodeID, - "full_name": item.Repository.FullName, - "description": item.Repository.Description, - "html_url": item.Repository.HTMLURL, - "fork": item.Repository.Fork, - "private": item.Repository.Private, - "owner_login": item.Repository.Owner.Login, - }, - }, - }, + resource, err := GetDockerfile(ctx, githubClient, organizationName, item.Repository.FullName, item.Path, stream) + if err != nil { + log.Printf("Skipping %s/%s: %v\n", item.Repository.FullName, item.Path, err) + continue + } + if resource == nil { + // Means it didn't stream anything or some unknown reason + continue } totalCollected++ if stream != nil { // Stream the resource - if err := (*stream)(resource); err != nil { + if err := (*stream)(*resource); err != nil { return nil, fmt.Errorf("error streaming resource: %w", err) } } else { // Accumulate to return later - allValues = append(allValues, resource) + allValues = append(allValues, *resource) } if totalCollected >= MAX_RESULTS { @@ -168,108 +135,6 @@ func ListArtifactDockerFiles( return allValues, nil } -func fetchRepositoryDockerfiles(sdk *resilientbridge.ResilientBridge, repoFullName string, stream *models.StreamSender) ([]models.Resource, error) { - var allValues []models.Resource - totalCollected := 0 - perPage := 100 - - queryParts := []string{ - fmt.Sprintf("repo:%s", repoFullName), - "filename:Dockerfile", - } - finalQuery := strings.Join(queryParts, " ") - - page := 1 - for totalCollected < MAX_RESULTS { - q := url.QueryEscape(finalQuery) - searchEndpoint := fmt.Sprintf("/search/code?q=%s&per_page=%d&page=%d", q, perPage, page) - - searchReq := &resilientbridge.NormalizedRequest{ - Method: "GET", - Endpoint: searchEndpoint, - Headers: map[string]string{"Accept": "application/vnd.github+json"}, - } - - searchResp, err := sdk.Request("github", searchReq) - if err != nil { - log.Printf("Error searching code in %s: %v\n", repoFullName, err) - break - } - - if searchResp.StatusCode >= 400 { - log.Printf("HTTP error %d searching code in %s: %s\n", searchResp.StatusCode, repoFullName, string(searchResp.Data)) - break - } - - var result model.CodeSearchResult - if err := json.Unmarshal(searchResp.Data, &result); err != nil { - log.Printf("Error parsing code search response for %s: %v\n", repoFullName, err) - break - } - - // If no items returned, no more results - if len(result.Items) == 0 { - break - } - - for _, item := range result.Items { - // Use item.Sha to link to a specific commit version of the file - dockerfileURI := fmt.Sprintf("https://github.com/%s/blob/%s/%s", - item.Repository.FullName, - item.Sha, - item.Path) - - resource := models.Resource{ - ID: dockerfileURI, - Name: item.Name, - Description: JSONAllFieldsMarshaller{ - Value: model.ArtifactDockerFileDescription{ - Sha: item.Sha, - Name: item.Name, - Path: item.Path, - GitURL: item.GitURL, - HTMLURL: item.HTMLURL, - URI: dockerfileURI, - Repository: map[string]interface{}{ - "id": item.Repository.ID, - "node_id": item.Repository.NodeID, - "full_name": item.Repository.FullName, - "description": item.Repository.Description, - "html_url": item.Repository.HTMLURL, - "fork": item.Repository.Fork, - "private": item.Repository.Private, - "owner_login": item.Repository.Owner.Login, - }, - }, - }, - } - - totalCollected++ - if stream != nil { - // Stream the resource - if err := (*stream)(resource); err != nil { - return nil, fmt.Errorf("error streaming resource: %w", err) - } - } else { - // Accumulate to return later - allValues = append(allValues, resource) - } - - if totalCollected >= MAX_RESULTS { - break - } - } - - if len(result.Items) < perPage { - // Fewer than perPage results means no more pages - break - } - page++ - } - - return allValues, nil -} - // GetDockerfile fetches the details and content of a single Dockerfile given the repo and file path. // It returns a fully populated resource with Dockerfile content, line count checks, and last updated at info. func GetDockerfile(ctx context.Context, githubClient GitHubClient, organizationName, repoFullName, filePath string, stream *models.StreamSender) (*models.Resource, error) { @@ -321,41 +186,41 @@ func GetDockerfile(ctx context.Context, githubClient GitHubClient, organizationN } // Fetch last_updated_at via commits API - //var lastUpdatedAt string - //commitsEndpoint := fmt.Sprintf("/repos/%s/commits?path=%s&per_page=1", repoFullName, url.QueryEscape(filePath)) - //commitReq := &resilientbridge.NormalizedRequest{ - // Method: "GET", - // Endpoint: commitsEndpoint, - // Headers: map[string]string{"Accept": "application/vnd.github+json"}, - //} - - //commitResp, err := sdk.Request("github", commitReq) - //if err == nil && commitResp.StatusCode < 400 { - // var commits []model.CommitResponse - // if json.Unmarshal(commitResp.Data, &commits) == nil && len(commits) > 0 { - // if commits[0].Commit.Author.Date != "" { - // lastUpdatedAt = commits[0].Commit.Author.Date - // } else if commits[0].Commit.Committer.Date != "" { - // lastUpdatedAt = commits[0].Commit.Committer.Date - // } - // } - //} + var lastUpdatedAt string + commitsEndpoint := fmt.Sprintf("/repos/%s/commits?path=%s&per_page=1", repoFullName, url.QueryEscape(filePath)) + commitReq := &resilientbridge.NormalizedRequest{ + Method: "GET", + Endpoint: commitsEndpoint, + Headers: map[string]string{"Accept": "application/vnd.github+json"}, + } + + commitResp, err := sdk.Request("github", commitReq) + if err == nil && commitResp.StatusCode < 400 { + var commits []model.CommitResponse + if json.Unmarshal(commitResp.Data, &commits) == nil && len(commits) > 0 { + if commits[0].Commit.Author.Date != "" { + lastUpdatedAt = commits[0].Commit.Author.Date + } else if commits[0].Commit.Committer.Date != "" { + lastUpdatedAt = commits[0].Commit.Committer.Date + } + } + } repoObj := map[string]interface{}{ "full_name": repoFullName, } output := model.ArtifactDockerFileDescription{ - Sha: contentData.Sha, - Name: contentData.Name, - Path: contentData.Path, - //LastUpdatedAt: lastUpdatedAt, - GitURL: contentData.GitURL, - HTMLURL: contentData.HTMLURL, - URI: contentData.HTMLURL, - //DockerfileContent: fileContent, - //DockerfileContentBase64: contentData.Content, - Repository: repoObj, + Sha: contentData.Sha, + Name: contentData.Name, + Path: contentData.Path, + LastUpdatedAt: lastUpdatedAt, + GitURL: contentData.GitURL, + HTMLURL: contentData.HTMLURL, + URI: contentData.HTMLURL, + DockerfileContent: fileContent, + DockerfileContentBase64: contentData.Content, + Repository: repoObj, } value := models.Resource{ @@ -366,11 +231,5 @@ func GetDockerfile(ctx context.Context, githubClient GitHubClient, organizationN }, } - if stream != nil { - if err := (*stream)(value); err != nil { - return nil, err - } - } - return &value, nil } diff --git a/provider/describer/repository.go b/provider/describer/repository.go index dfe5c612..d14b03a2 100644 --- a/provider/describer/repository.go +++ b/provider/describer/repository.go @@ -52,27 +52,31 @@ func GetRepositoryListWithOptions( page := 1 org := ctx.Value("organization") - orgName := org.(string) - if orgName != "" { - organizationName = orgName + if org != nil { + orgName := org.(string) + if orgName != "" { + organizationName = orgName + } } repo := ctx.Value("repository") - repoName := repo.(string) - if repoName != "" { - finalResource, err := GetRepository( - ctx, - githubClient, - organizationName, - repoName, - "", // pass along or just "" - stream, - ) - if err != nil { - return nil, fmt.Errorf("error fetching details for %s/%s: %v", organizationName, repoName, err) - } + if repo != nil { + repoName := repo.(string) + if repoName != "" { + finalResource, err := GetRepository( + ctx, + githubClient, + organizationName, + repoName, + "", // pass along or just "" + stream, + ) + if err != nil { + return nil, fmt.Errorf("error fetching details for %s/%s: %v", organizationName, repoName, err) + } - return []models.Resource{*finalResource}, nil + return []models.Resource{*finalResource}, nil + } } for len(allFinalResources) < MAX_REPOS_TO_LIST { diff --git a/provider/model/model.go b/provider/model/model.go index de986877..c8e435dc 100755 --- a/provider/model/model.go +++ b/provider/model/model.go @@ -1326,14 +1326,14 @@ type CommitResponse struct { } type ArtifactDockerFileDescription struct { - Sha string `json:"sha"` - Name string `json:"name"` - Path string `json:"path"` - //LastUpdatedAt string `json:"last_updated_at"` - GitURL string `json:"git_url"` - HTMLURL string `json:"html_url"` - URI string `json:"uri"` // Unique identifier - //DockerfileContent string `json:"dockerfile_content"` - //DockerfileContentBase64 string `json:"dockerfile_content_base64"` - Repository map[string]interface{} `json:"repository"` + Sha string `json:"sha"` + Name string `json:"name"` + Path string `json:"path"` + LastUpdatedAt string `json:"last_updated_at"` + GitURL string `json:"git_url"` + HTMLURL string `json:"html_url"` + URI string `json:"uri"` // Unique identifier + DockerfileContent string `json:"dockerfile_content"` + DockerfileContentBase64 string `json:"dockerfile_content_base64"` + Repository map[string]interface{} `json:"repository"` } From 0a9c8eae80e4ea413dcd3c551fae0435c237e197 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 22 Dec 2024 22:19:07 +0330 Subject: [PATCH 2/3] fixed other resources with parameter --- provider/describer/action_workflow_run.go | 128 ++++++++++++++---- provider/describer/artifact_dockerfile.go | 109 ++++++++++++++- provider/describer/container_package.go | 10 +- .../table_github_artifact_dockerfile.go | 15 ++ 4 files changed, 223 insertions(+), 39 deletions(-) diff --git a/provider/describer/action_workflow_run.go b/provider/describer/action_workflow_run.go index 25b5aa6f..24ceabf2 100644 --- a/provider/describer/action_workflow_run.go +++ b/provider/describer/action_workflow_run.go @@ -24,49 +24,117 @@ func GetAllWorkflowRuns(ctx context.Context, githubClient GitHubClient, organiza sdk := newResilientSDK(githubClient.Token) org := ctx.Value("organization") - orgName := org.(string) - if orgName != "" { - organizationName = orgName + if org != nil { + orgName := org.(string) + if orgName != "" { + organizationName = orgName + } } repo := ctx.Value("repository") - repoName := repo.(string) - - runNumberParam := ctx.Value("run_number") - runNumber := runNumberParam.(string) - - if runNumber != "" { - runNumbers := parseRunNumberFlag(runNumber) - - if repoName != "" { - var values []models.Resource - repoValues, err := GetRepositoryWorkflowRuns(ctx, sdk, stream, organizationName, repoName, runNumbers) - if err != nil { - return nil, err + if repo != nil { + repoName := repo.(string) + + runNumberParam := ctx.Value("run_number") + if runNumberParam != nil { + runNumber := runNumberParam.(string) + + if runNumber != "" { + runNumbers := parseRunNumberFlag(runNumber) + + if repoName != "" { + var values []models.Resource + repoValues, err := GetRepositoryWorkflowRuns(ctx, sdk, stream, organizationName, repoName, runNumbers) + if err != nil { + return nil, err + } + values = append(values, repoValues...) + return values, nil + } else { + var values []models.Resource + for _, repo := range repositories { + // repo.Name should be the repository name field from the returned resources + repoValues, err := GetRepositoryWorkflowRuns(ctx, sdk, stream, organizationName, repo.Name, runNumbers) + if err != nil { + return nil, err + } + values = append(values, repoValues...) + } + return values, nil + } + } else { + if repoName != "" { + var values []models.Resource + repoValues, err := GetRepositoryWorkflowRuns(ctx, sdk, stream, organizationName, repoName, nil) + if err != nil { + return nil, err + } + values = append(values, repoValues...) + return values, nil + } else { + var values []models.Resource + for _, repo := range repositories { + // repo.Name should be the repository name field from the returned resources + repoValues, err := GetRepositoryWorkflowRuns(ctx, sdk, stream, organizationName, repo.Name, nil) + if err != nil { + return nil, err + } + values = append(values, repoValues...) + } + return values, nil + } } - values = append(values, repoValues...) - return values, nil } else { - var values []models.Resource - for _, repo := range repositories { - // repo.Name should be the repository name field from the returned resources - repoValues, err := GetRepositoryWorkflowRuns(ctx, sdk, stream, organizationName, repo.Name, runNumbers) + if repoName != "" { + var values []models.Resource + repoValues, err := GetRepositoryWorkflowRuns(ctx, sdk, stream, organizationName, repoName, nil) if err != nil { return nil, err } values = append(values, repoValues...) + return values, nil + } else { + var values []models.Resource + for _, repo := range repositories { + // repo.Name should be the repository name field from the returned resources + repoValues, err := GetRepositoryWorkflowRuns(ctx, sdk, stream, organizationName, repo.Name, nil) + if err != nil { + return nil, err + } + values = append(values, repoValues...) + } + return values, nil } - return values, nil } } else { - if repoName != "" { - var values []models.Resource - repoValues, err := GetRepositoryWorkflowRuns(ctx, sdk, stream, organizationName, repoName, nil) - if err != nil { - return nil, err + runNumberParam := ctx.Value("run_number") + if runNumberParam != nil { + runNumber := runNumberParam.(string) + + if runNumber != "" { + runNumbers := parseRunNumberFlag(runNumber) + var values []models.Resource + for _, repo := range repositories { + // repo.Name should be the repository name field from the returned resources + repoValues, err := GetRepositoryWorkflowRuns(ctx, sdk, stream, organizationName, repo.Name, runNumbers) + if err != nil { + return nil, err + } + values = append(values, repoValues...) + } + return values, nil + } else { + var values []models.Resource + for _, repo := range repositories { + // repo.Name should be the repository name field from the returned resources + repoValues, err := GetRepositoryWorkflowRuns(ctx, sdk, stream, organizationName, repo.Name, nil) + if err != nil { + return nil, err + } + values = append(values, repoValues...) + } + return values, nil } - values = append(values, repoValues...) - return values, nil } else { var values []models.Resource for _, repo := range repositories { diff --git a/provider/describer/artifact_dockerfile.go b/provider/describer/artifact_dockerfile.go index 14507e41..0af28361 100644 --- a/provider/describer/artifact_dockerfile.go +++ b/provider/describer/artifact_dockerfile.go @@ -28,12 +28,6 @@ func ListArtifactDockerFiles( organizationName string, stream *models.StreamSender, ) ([]models.Resource, error) { - - repositories, err := getRepositories(ctx, githubClient.RestClient, organizationName) - if err != nil { - return nil, fmt.Errorf("error fetching repositories for org %s: %w", organizationName, err) - } - sdk := resilientbridge.NewResilientBridge() sdk.SetDebug(false) sdk.RegisterProvider("github", adapters.NewGitHubAdapter(githubClient.Token), &resilientbridge.ProviderConfig{ @@ -42,6 +36,28 @@ func ListArtifactDockerFiles( BaseBackoff: time.Second, }) + org := ctx.Value("organization") + if org != nil { + orgName := org.(string) + if orgName != "" { + organizationName = orgName + } + } + + repo := ctx.Value("repository") + if repo != nil { + repoName := repo.(string) + if repoName != "" { + repoFullName := fmt.Sprintf("%s/%s", organizationName, repoName) + return fetchRepositoryDockerfiles(ctx, sdk, githubClient, organizationName, repoFullName, stream) + } + } + + repositories, err := getRepositories(ctx, githubClient.RestClient, organizationName) + if err != nil { + return nil, fmt.Errorf("error fetching repositories for org %s: %w", organizationName, err) + } + var allValues []models.Resource totalCollected := 0 perPage := 100 @@ -135,6 +151,87 @@ func ListArtifactDockerFiles( return allValues, nil } +func fetchRepositoryDockerfiles(ctx context.Context, sdk *resilientbridge.ResilientBridge, githubClient GitHubClient, organizationName, repoFullName string, stream *models.StreamSender) ([]models.Resource, error) { + var allValues []models.Resource + totalCollected := 0 + perPage := 100 + + queryParts := []string{ + fmt.Sprintf("repo:%s", repoFullName), + "filename:Dockerfile", + } + finalQuery := strings.Join(queryParts, " ") + + page := 1 + for totalCollected < MAX_RESULTS { + q := url.QueryEscape(finalQuery) + searchEndpoint := fmt.Sprintf("/search/code?q=%s&per_page=%d&page=%d", q, perPage, page) + + searchReq := &resilientbridge.NormalizedRequest{ + Method: "GET", + Endpoint: searchEndpoint, + Headers: map[string]string{"Accept": "application/vnd.github+json"}, + } + + searchResp, err := sdk.Request("github", searchReq) + if err != nil { + log.Printf("Error searching code in %s: %v\n", repoFullName, err) + break + } + + if searchResp.StatusCode >= 400 { + log.Printf("HTTP error %d searching code in %s: %s\n", searchResp.StatusCode, repoFullName, string(searchResp.Data)) + break + } + + var result model.CodeSearchResult + if err := json.Unmarshal(searchResp.Data, &result); err != nil { + log.Printf("Error parsing code search response for %s: %v\n", repoFullName, err) + break + } + + // If no items returned, no more results + if len(result.Items) == 0 { + break + } + + for _, item := range result.Items { + resource, err := GetDockerfile(ctx, githubClient, organizationName, item.Repository.FullName, item.Path, stream) + if err != nil { + log.Printf("Skipping %s/%s: %v\n", item.Repository.FullName, item.Path, err) + continue + } + if resource == nil { + // Means it didn't stream anything or some unknown reason + continue + } + + totalCollected++ + if stream != nil { + // Stream the resource + if err := (*stream)(*resource); err != nil { + return nil, fmt.Errorf("error streaming resource: %w", err) + } + } else { + // Accumulate to return later + allValues = append(allValues, *resource) + } + + if totalCollected >= MAX_RESULTS { + break + } + } + + if len(result.Items) < perPage { + // Fewer than perPage results means no more pages + break + } + page++ + } + + return allValues, nil +} + // GetDockerfile fetches the details and content of a single Dockerfile given the repo and file path. // It returns a fully populated resource with Dockerfile content, line count checks, and last updated at info. func GetDockerfile(ctx context.Context, githubClient GitHubClient, organizationName, repoFullName, filePath string, stream *models.StreamSender) (*models.Resource, error) { diff --git a/provider/describer/container_package.go b/provider/describer/container_package.go index 3a30eaeb..43d9146f 100644 --- a/provider/describer/container_package.go +++ b/provider/describer/container_package.go @@ -35,10 +35,14 @@ func GetContainerPackageList( BaseBackoff: 0, }) + org := organizationName + organization := ctx.Value("organization") - org := organization.(string) - if org == "" { - org = organizationName + if organization != nil { + org = organization.(string) + if org == "" { + org = organizationName + } } // [UPDATED] fetchPackages now does pagination diff --git a/steampipe-plugin-github/github/table_github_artifact_dockerfile.go b/steampipe-plugin-github/github/table_github_artifact_dockerfile.go index 3472632d..022b4bf8 100644 --- a/steampipe-plugin-github/github/table_github_artifact_dockerfile.go +++ b/steampipe-plugin-github/github/table_github_artifact_dockerfile.go @@ -34,6 +34,11 @@ func tableGitHubArtifactDockerFile() *plugin.Table { Type: proto.ColumnType_STRING, Transform: transform.FromField("Description.Path"), Description: "Path to the Dockerfile in the repository."}, + { + Name: "last_updated_at", + Type: proto.ColumnType_STRING, + Transform: transform.FromField("Description.LastUpdatedAt"), + Description: "Last time the dockerfile updated"}, { Name: "git_url", Type: proto.ColumnType_STRING, @@ -49,6 +54,16 @@ func tableGitHubArtifactDockerFile() *plugin.Table { Type: proto.ColumnType_STRING, Transform: transform.FromField("Description.URI"), Description: "Unique URI for the Dockerfile."}, + { + Name: "dockerfile_content", + Type: proto.ColumnType_STRING, + Transform: transform.FromField("Description.DockerfileContent"), + Description: "Dockerfile content."}, + { + Name: "dockerfile_content_base64", + Type: proto.ColumnType_STRING, + Transform: transform.FromField("Description.DockerfileContentBase64"), + Description: "Dockerfile content base64."}, { Name: "repository", Type: proto.ColumnType_JSON, From c199ef798e2264cbbae7ee18ac23ea1b9ca72658 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 22 Dec 2024 22:27:20 +0330 Subject: [PATCH 3/3] fix: runned auto generate code --- pkg/sdk/es/resources_clients.go | 34 +++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/pkg/sdk/es/resources_clients.go b/pkg/sdk/es/resources_clients.go index dc06c9ac..0fc061a6 100644 --- a/pkg/sdk/es/resources_clients.go +++ b/pkg/sdk/es/resources_clients.go @@ -7284,13 +7284,16 @@ func (p ArtifactDockerFilePaginator) NextPage(ctx context.Context) ([]ArtifactDo } var listArtifactDockerFileFilters = map[string]string{ - "git_url": "Description.GitURL", - "html_url": "Description.HTMLURL", - "name": "Description.Name", - "path": "Description.Path", - "repository": "Description.Repository", - "sha": "Description.Sha", - "uri": "Description.URI", + "dockerfile_content": "Description.DockerfileContent", + "dockerfile_content_base64": "Description.DockerfileContentBase64", + "git_url": "Description.GitURL", + "html_url": "Description.HTMLURL", + "last_updated_at": "Description.LastUpdatedAt", + "name": "Description.Name", + "path": "Description.Path", + "repository": "Description.Repository", + "sha": "Description.Sha", + "uri": "Description.URI", } func ListArtifactDockerFile(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) { @@ -7354,13 +7357,16 @@ func ListArtifactDockerFile(ctx context.Context, d *plugin.QueryData, _ *plugin. } var getArtifactDockerFileFilters = map[string]string{ - "git_url": "Description.GitURL", - "html_url": "Description.HTMLURL", - "name": "Description.Name", - "path": "Description.Path", - "repository": "Description.Repository", - "sha": "Description.Sha", - "uri": "Description.URI", + "dockerfile_content": "Description.DockerfileContent", + "dockerfile_content_base64": "Description.DockerfileContentBase64", + "git_url": "Description.GitURL", + "html_url": "Description.HTMLURL", + "last_updated_at": "Description.LastUpdatedAt", + "name": "Description.Name", + "path": "Description.Path", + "repository": "Description.Repository", + "sha": "Description.Sha", + "uri": "Description.URI", } func GetArtifactDockerFile(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) {