diff --git a/github/errors.go b/github/errors.go index 596152b..f07357e 100644 --- a/github/errors.go +++ b/github/errors.go @@ -61,9 +61,9 @@ func retryConfig() *plugin.RetryConfig { } } -// function which returns an ErrorPredicate for GitHub API calls -func isNotFoundError(notFoundErrors []string) plugin.ErrorPredicate { - return func(err error) bool { +// function which returns an ErrorPredicateWithContext for GitHub API calls +func isNotFoundError(notFoundErrors []string) plugin.ErrorPredicateWithContext { + return func(_ context.Context, _ *plugin.QueryData, _ *plugin.HydrateData, err error) bool { if err != nil { for _, item := range notFoundErrors { if strings.Contains(err.Error(), item) { diff --git a/github/table_github_actions_artifact.go b/github/table_github_actions_artifact.go index 8c09855..5cdfe84 100644 --- a/github/table_github_actions_artifact.go +++ b/github/table_github_actions_artifact.go @@ -15,14 +15,14 @@ func tableGitHubActionsArtifact() *plugin.Table { Name: "github_actions_artifact", Description: "Artifacts allow you to share data between jobs in a workflow and store data once that workflow has completed.", List: &plugin.ListConfig{ - KeyColumns: plugin.SingleColumn("repository_full_name"), - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubArtifactList, + KeyColumns: plugin.SingleColumn("repository_full_name"), + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubArtifactList, }, Get: &plugin.GetConfig{ - KeyColumns: plugin.AllColumns([]string{"repository_full_name", "id"}), - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubArtifactGet, + KeyColumns: plugin.AllColumns([]string{"repository_full_name", "id"}), + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubArtifactGet, }, Columns: commonColumns([]*plugin.Column{ // Top columns diff --git a/github/table_github_actions_cache.go b/github/table_github_actions_cache.go index 04b1104..f21802e 100644 --- a/github/table_github_actions_cache.go +++ b/github/table_github_actions_cache.go @@ -20,8 +20,8 @@ func tableGitHubActionsCache() *plugin.Table { {Name: "key", Require: plugin.Optional}, {Name: "ref", Require: plugin.Optional}, }, - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubCacheList, + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubCacheList, }, Columns: commonColumns([]*plugin.Column{ // Top columns diff --git a/github/table_github_actions_environment_variable.go b/github/table_github_actions_environment_variable.go index 0547704..63d8820 100644 --- a/github/table_github_actions_environment_variable.go +++ b/github/table_github_actions_environment_variable.go @@ -15,14 +15,14 @@ func tableGitHubActionsEnvironmentVariable() *plugin.Table { Name: "github_actions_environment_variable", Description: "Variables are unencrypted environment variables that you create in a repository environment for use in GitHub Actions workflows.", List: &plugin.ListConfig{ - KeyColumns: plugin.AllColumns([]string{"repository_full_name", "environment_name"}), - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubEnvVariableList, + KeyColumns: plugin.AllColumns([]string{"repository_full_name", "environment_name"}), + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubEnvVariableList, }, Get: &plugin.GetConfig{ - KeyColumns: plugin.AllColumns([]string{"repository_full_name", "environment_name", "name"}), - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubEnvVariableGet, + KeyColumns: plugin.AllColumns([]string{"repository_full_name", "environment_name", "name"}), + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubEnvVariableGet, }, Columns: commonColumns([]*plugin.Column{ {Name: "repository_full_name", Type: proto.ColumnType_STRING, Transform: transform.FromQual("repository_full_name"), Description: "Full name of the repository that contains the environment."}, diff --git a/github/table_github_actions_organization_variable.go b/github/table_github_actions_organization_variable.go index a96ea49..15d1ee1 100644 --- a/github/table_github_actions_organization_variable.go +++ b/github/table_github_actions_organization_variable.go @@ -15,14 +15,14 @@ func tableGitHubActionsOrganizationVariable() *plugin.Table { Name: "github_actions_organization_variable", Description: "Variables are unencrypted environment variables created in an organization for use in GitHub Actions workflows.", List: &plugin.ListConfig{ - KeyColumns: plugin.SingleColumn("organization"), - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubOrgVariableList, + KeyColumns: plugin.SingleColumn("organization"), + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubOrgVariableList, }, Get: &plugin.GetConfig{ - KeyColumns: plugin.AllColumns([]string{"organization", "name"}), - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubOrgVariableGet, + KeyColumns: plugin.AllColumns([]string{"organization", "name"}), + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubOrgVariableGet, }, Columns: commonColumns([]*plugin.Column{ {Name: "organization", Type: proto.ColumnType_STRING, Transform: transform.FromQual("organization"), Description: "The organization name."}, diff --git a/github/table_github_actions_repository_runner.go b/github/table_github_actions_repository_runner.go index 57e398c..22f42e8 100644 --- a/github/table_github_actions_repository_runner.go +++ b/github/table_github_actions_repository_runner.go @@ -15,14 +15,14 @@ func tableGitHubActionsRepositoryRunner() *plugin.Table { Name: "github_actions_repository_runner", Description: "The runner is the application that runs a job from a GitHub Actions workflow", List: &plugin.ListConfig{ - KeyColumns: plugin.SingleColumn("repository_full_name"), - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubRunnerList, + KeyColumns: plugin.SingleColumn("repository_full_name"), + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubRunnerList, }, Get: &plugin.GetConfig{ - KeyColumns: plugin.AllColumns([]string{"repository_full_name", "id"}), - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubRunnerGet, + KeyColumns: plugin.AllColumns([]string{"repository_full_name", "id"}), + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubRunnerGet, }, Columns: commonColumns([]*plugin.Column{ // Top columns diff --git a/github/table_github_actions_repository_secret.go b/github/table_github_actions_repository_secret.go index dbaf4c7..06837ac 100644 --- a/github/table_github_actions_repository_secret.go +++ b/github/table_github_actions_repository_secret.go @@ -15,14 +15,14 @@ func tableGitHubActionsRepositorySecret() *plugin.Table { Name: "github_actions_repository_secret", Description: "Secrets are encrypted environment variables that you create in a repository", List: &plugin.ListConfig{ - KeyColumns: plugin.SingleColumn("repository_full_name"), - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubRepoSecretList, + KeyColumns: plugin.SingleColumn("repository_full_name"), + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubRepoSecretList, }, Get: &plugin.GetConfig{ - KeyColumns: plugin.AllColumns([]string{"repository_full_name", "name"}), - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubRepoSecretGet, + KeyColumns: plugin.AllColumns([]string{"repository_full_name", "name"}), + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubRepoSecretGet, }, Columns: commonColumns([]*plugin.Column{ // Top columns diff --git a/github/table_github_actions_repository_variable.go b/github/table_github_actions_repository_variable.go index 22d1540..4c536a9 100644 --- a/github/table_github_actions_repository_variable.go +++ b/github/table_github_actions_repository_variable.go @@ -15,14 +15,14 @@ func tableGitHubActionsRepositoryVariable() *plugin.Table { Name: "github_actions_repository_variable", Description: "Variables are unencrypted environment variables created in a repository for use in GitHub Actions workflows.", List: &plugin.ListConfig{ - KeyColumns: plugin.SingleColumn("repository_full_name"), - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubRepoVariableList, + KeyColumns: plugin.SingleColumn("repository_full_name"), + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubRepoVariableList, }, Get: &plugin.GetConfig{ - KeyColumns: plugin.AllColumns([]string{"repository_full_name", "name"}), - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubRepoVariableGet, + KeyColumns: plugin.AllColumns([]string{"repository_full_name", "name"}), + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubRepoVariableGet, }, Columns: commonColumns([]*plugin.Column{ {Name: "repository_full_name", Type: proto.ColumnType_STRING, Transform: transform.FromQual("repository_full_name"), Description: "Full name of the repository that contains the variable."}, diff --git a/github/table_github_actions_repository_workflow_job.go b/github/table_github_actions_repository_workflow_job.go index 718df2d..ac0b840 100644 --- a/github/table_github_actions_repository_workflow_job.go +++ b/github/table_github_actions_repository_workflow_job.go @@ -19,16 +19,16 @@ func tableGitHubActionsRepositoryWorkflowJob() *plugin.Table { {Name: "repository_full_name", Require: plugin.Required}, {Name: "run_id", Require: plugin.Required}, }, - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubRepoWorkflowJobList, + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubRepoWorkflowJobList, }, Get: &plugin.GetConfig{ KeyColumns: []*plugin.KeyColumn{ {Name: "repository_full_name", Require: plugin.Required, Operators: []string{"="}}, {Name: "id", Require: plugin.Required, Operators: []string{"="}}, }, - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubRepoWorkflowJobGet, + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubRepoWorkflowJobGet, }, Columns: commonColumns([]*plugin.Column{ // Top columns diff --git a/github/table_github_actions_repository_workflow_run.go b/github/table_github_actions_repository_workflow_run.go index d498739..b35449e 100644 --- a/github/table_github_actions_repository_workflow_run.go +++ b/github/table_github_actions_repository_workflow_run.go @@ -17,8 +17,8 @@ func tableGitHubActionsRepositoryWorkflowRun() *plugin.Table { Name: "github_actions_repository_workflow_run", Description: "WorkflowRun represents a repository action workflow run", List: &plugin.ListConfig{ - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubRepoWorkflowRunList, + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubRepoWorkflowRunList, KeyColumns: []*plugin.KeyColumn{ {Name: "repository_full_name", Require: plugin.Required}, {Name: "workflow_id", Require: plugin.Optional}, @@ -37,8 +37,8 @@ func tableGitHubActionsRepositoryWorkflowRun() *plugin.Table { {Name: "id", Require: plugin.Required, Operators: []string{"="}}, {Name: "run_attempt", Require: plugin.Optional, Operators: []string{"="}, CacheMatch: query_cache.CacheMatchExact}, }, - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubRepoWorkflowRunGet, + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubRepoWorkflowRunGet, }, Columns: commonColumns([]*plugin.Column{ // Top columns diff --git a/github/table_github_blob.go b/github/table_github_blob.go index 26f7d76..f5689f8 100644 --- a/github/table_github_blob.go +++ b/github/table_github_blob.go @@ -13,8 +13,8 @@ func tableGitHubBlob() *plugin.Table { Name: "github_blob", Description: "Gets a blob from a repository.", List: &plugin.ListConfig{ - Hydrate: tableGitHubBlobList, - ShouldIgnoreError: isNotFoundError([]string{"404"}), + Hydrate: tableGitHubBlobList, + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, KeyColumns: []*plugin.KeyColumn{ {Name: "repository_full_name", Require: plugin.Required}, {Name: "blob_sha", Require: plugin.Required}, diff --git a/github/table_github_branch.go b/github/table_github_branch.go index 987f476..d16f06f 100644 --- a/github/table_github_branch.go +++ b/github/table_github_branch.go @@ -19,8 +19,8 @@ func tableGitHubBranch() *plugin.Table { KeyColumns: []*plugin.KeyColumn{ {Name: "repository_full_name", Require: plugin.Required}, }, - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubBranchList, + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubBranchList, }, Columns: commonColumns([]*plugin.Column{ {Name: "repository_full_name", Type: proto.ColumnType_STRING, Transform: transform.FromQual("repository_full_name"), Description: "Full name of the repository that contains the branch."}, diff --git a/github/table_github_code_owner.go b/github/table_github_code_owner.go index b2bc801..680f7d6 100644 --- a/github/table_github_code_owner.go +++ b/github/table_github_code_owner.go @@ -30,9 +30,9 @@ func tableGitHubCodeOwner() *plugin.Table { Name: "github_code_owner", Description: "Individuals or teams that are responsible for code in a repository.", List: &plugin.ListConfig{ - Hydrate: tableGitHubCodeOwnerList, - ShouldIgnoreError: isNotFoundError([]string{"404"}), - KeyColumns: plugin.SingleColumn("repository_full_name"), + Hydrate: tableGitHubCodeOwnerList, + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + KeyColumns: plugin.SingleColumn("repository_full_name"), }, Columns: commonColumns(gitHubCodeOwnerColumns()), } diff --git a/github/table_github_commit.go b/github/table_github_commit.go index 34ba4b9..bcaa566 100644 --- a/github/table_github_commit.go +++ b/github/table_github_commit.go @@ -17,7 +17,7 @@ func tableGitHubCommit() *plugin.Table { Name: "github_commit", Description: "GitHub Commits bundle project files for download by users.", List: &plugin.ListConfig{ - ShouldIgnoreError: isNotFoundError([]string{"404"}), + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, KeyColumns: []*plugin.KeyColumn{ {Name: "repository_full_name", Require: plugin.Required}, {Name: "authored_date", Require: plugin.Optional, Operators: []string{">", ">=", "=", "<", "<="}}, @@ -25,9 +25,9 @@ func tableGitHubCommit() *plugin.Table { Hydrate: tableGitHubCommitList, }, Get: &plugin.GetConfig{ - KeyColumns: plugin.AllColumns([]string{"repository_full_name", "sha"}), - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubCommitGet, + KeyColumns: plugin.AllColumns([]string{"repository_full_name", "sha"}), + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubCommitGet, }, Columns: commonColumns([]*plugin.Column{ {Name: "repository_full_name", Type: proto.ColumnType_STRING, Transform: transform.FromQual("repository_full_name"), Description: "Full name of the repository that contains the commit."}, diff --git a/github/table_github_community_profile.go b/github/table_github_community_profile.go index 5ae01a1..e49d472 100644 --- a/github/table_github_community_profile.go +++ b/github/table_github_community_profile.go @@ -15,9 +15,9 @@ func tableGitHubCommunityProfile() *plugin.Table { Name: "github_community_profile", Description: "Community profile information for the given repository.", List: &plugin.ListConfig{ - KeyColumns: plugin.SingleColumn("repository_full_name"), - Hydrate: tableGitHubCommunityProfileList, - ShouldIgnoreError: isNotFoundError([]string{"404"}), + KeyColumns: plugin.SingleColumn("repository_full_name"), + Hydrate: tableGitHubCommunityProfileList, + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, }, Columns: commonColumns([]*plugin.Column{ {Name: "repository_full_name", Type: proto.ColumnType_STRING, Transform: transform.FromQual("repository_full_name"), Description: "Full name of the repository that contains the tag."}, diff --git a/github/table_github_gist.go b/github/table_github_gist.go index 640338b..7fe858d 100644 --- a/github/table_github_gist.go +++ b/github/table_github_gist.go @@ -36,9 +36,9 @@ func tableGitHubGist() *plugin.Table { Name: "github_gist", Description: "GitHub Gist is a simple way to share snippets and pastes with others.", List: &plugin.ListConfig{ - Hydrate: tableGitHubGistList, - KeyColumns: plugin.SingleColumn("id"), - ShouldIgnoreError: isNotFoundError([]string{"404"}), + Hydrate: tableGitHubGistList, + KeyColumns: plugin.SingleColumn("id"), + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, }, Columns: commonColumns(gitHubGistColumns()), } diff --git a/github/table_github_gitignore.go b/github/table_github_gitignore.go index e830ae1..7b4350e 100644 --- a/github/table_github_gitignore.go +++ b/github/table_github_gitignore.go @@ -17,9 +17,9 @@ func tableGitHubGitignore() *plugin.Table { Hydrate: tableGitHubGitignoreList, }, Get: &plugin.GetConfig{ - KeyColumns: plugin.SingleColumn("name"), - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubGitignoreGetData, + KeyColumns: plugin.SingleColumn("name"), + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubGitignoreGetData, }, Columns: commonColumns([]*plugin.Column{ // Top columns diff --git a/github/table_github_issue.go b/github/table_github_issue.go index 62a4238..2f8d426 100644 --- a/github/table_github_issue.go +++ b/github/table_github_issue.go @@ -91,13 +91,13 @@ func tableGitHubIssue() *plugin.Table { Operators: []string{">", ">="}, }, }, - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubRepositoryIssueList, + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubRepositoryIssueList, }, Get: &plugin.GetConfig{ - KeyColumns: plugin.AllColumns([]string{"repository_full_name", "number"}), - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubRepositoryIssueGet, + KeyColumns: plugin.AllColumns([]string{"repository_full_name", "number"}), + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubRepositoryIssueGet, }, Columns: commonColumns(gitHubIssueColumns()), } diff --git a/github/table_github_issue_comment.go b/github/table_github_issue_comment.go index 764e9a0..009d89c 100644 --- a/github/table_github_issue_comment.go +++ b/github/table_github_issue_comment.go @@ -46,9 +46,9 @@ func tableGitHubIssueComment() *plugin.Table { Name: "github_issue_comment", Description: "GitHub Issue Comments are the responses/comments on GitHub Issues.", List: &plugin.ListConfig{ - KeyColumns: plugin.AllColumns([]string{"repository_full_name", "number"}), - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubRepositoryIssueCommentList, + KeyColumns: plugin.AllColumns([]string{"repository_full_name", "number"}), + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubRepositoryIssueCommentList, }, Columns: commonColumns(sharedCommentsColumns()), } diff --git a/github/table_github_license.go b/github/table_github_license.go index c288a65..f00f1fb 100644 --- a/github/table_github_license.go +++ b/github/table_github_license.go @@ -19,9 +19,9 @@ func tableGitHubLicense() *plugin.Table { Hydrate: tableGitHubLicenseList, }, Get: &plugin.GetConfig{ - KeyColumns: plugin.SingleColumn("key"), - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubLicenseGetData, + KeyColumns: plugin.SingleColumn("key"), + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubLicenseGetData, }, Columns: commonColumns([]*plugin.Column{ {Name: "spdx_id", Description: "The Software Package Data Exchange (SPDX) id of the license.", Type: proto.ColumnType_STRING, Transform: transform.FromValue(), Hydrate: licenseHydrateSpdxId}, diff --git a/github/table_github_my_repository.go b/github/table_github_my_repository.go index 8ba6ea5..7b01f4c 100644 --- a/github/table_github_my_repository.go +++ b/github/table_github_my_repository.go @@ -12,8 +12,8 @@ func tableGitHubMyRepository() *plugin.Table { Name: "github_my_repository", Description: "GitHub Repositories that you are associated with. GitHub Repositories contain all of your project's files and each file's revision history.", List: &plugin.ListConfig{ - Hydrate: tableGitHubMyRepositoryList, - ShouldIgnoreError: isNotFoundError([]string{"404"}), + Hydrate: tableGitHubMyRepositoryList, + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, }, Columns: commonColumns(sharedRepositoryColumns()), } diff --git a/github/table_github_my_star.go b/github/table_github_my_star.go index 8ca456a..868c10a 100644 --- a/github/table_github_my_star.go +++ b/github/table_github_my_star.go @@ -15,8 +15,8 @@ func tableGitHubMyStar() *plugin.Table { Name: "github_my_star", Description: "GitHub stars owned by you. GitHub stars are repositories.", List: &plugin.ListConfig{ - Hydrate: tableGitHubMyStarredRepositoryList, - ShouldIgnoreError: isNotFoundError([]string{"404"}), + Hydrate: tableGitHubMyStarredRepositoryList, + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, }, Columns: commonColumns([]*plugin.Column{ {Name: "repository_full_name", Type: proto.ColumnType_STRING, Description: "The full name of the repository, including the owner and repo name.", Transform: transform.FromValue(), Hydrate: starHydrateNameWithOwner}, diff --git a/github/table_github_my_team.go b/github/table_github_my_team.go index ef0e370..82c3781 100644 --- a/github/table_github_my_team.go +++ b/github/table_github_my_team.go @@ -17,9 +17,9 @@ func tableGitHubMyTeam() *plugin.Table { Hydrate: tableGitHubMyTeamList, }, Get: &plugin.GetConfig{ - KeyColumns: plugin.AllColumns([]string{"organization", "slug"}), - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubTeamGet, + KeyColumns: plugin.AllColumns([]string{"organization", "slug"}), + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubTeamGet, }, Columns: commonColumns(gitHubTeamColumns()), } diff --git a/github/table_github_organization.go b/github/table_github_organization.go index 743ddd8..c2975a7 100644 --- a/github/table_github_organization.go +++ b/github/table_github_organization.go @@ -106,9 +106,9 @@ func tableGitHubOrganization() *plugin.Table { Name: "github_organization", Description: "GitHub Organizations are shared accounts where businesses and open-source projects can collaborate across many projects at once.", List: &plugin.ListConfig{ - KeyColumns: plugin.SingleColumn("login"), - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubOrganizationList, + KeyColumns: plugin.SingleColumn("login"), + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubOrganizationList, }, Columns: commonColumns(gitHubOrganizationColumns()), } diff --git a/github/table_github_organization_dependabot_alert.go b/github/table_github_organization_dependabot_alert.go index 62cecff..2c998c0 100644 --- a/github/table_github_organization_dependabot_alert.go +++ b/github/table_github_organization_dependabot_alert.go @@ -190,8 +190,8 @@ func tableGitHubOrganizationDependabotAlert() *plugin.Table { Require: plugin.Optional, }, }, - ShouldIgnoreError: isNotFoundError([]string{"404", "403"}), - Hydrate: tableGitHubOrganizationDependabotAlertList, + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404", "403"})}, + Hydrate: tableGitHubOrganizationDependabotAlertList, }, Columns: commonColumns(append( gitHubDependabotAlertColumns(), diff --git a/github/table_github_package.go b/github/table_github_package.go index f35b1fb..96fdb94 100644 --- a/github/table_github_package.go +++ b/github/table_github_package.go @@ -21,13 +21,13 @@ func tableGitHubPackage() *plugin.Table { {Name: "package_type", Require: plugin.Optional}, {Name: "visibility", Require: plugin.Optional}, }, - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubPackageList, + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubPackageList, }, Get: &plugin.GetConfig{ - KeyColumns: plugin.AllColumns([]string{"organization", "name", "package_type"}), - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubPackageGet, + KeyColumns: plugin.AllColumns([]string{"organization", "name", "package_type"}), + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubPackageGet, }, Columns: commonColumns([]*plugin.Column{ {Name: "id", Type: proto.ColumnType_INT, Description: "Unique ID of the package."}, diff --git a/github/table_github_package_version.go b/github/table_github_package_version.go index db557d8..2d61ca9 100644 --- a/github/table_github_package_version.go +++ b/github/table_github_package_version.go @@ -23,14 +23,14 @@ func tableGitHubPackageVersion() *plugin.Table { {Name: "package_name", Require: plugin.Optional}, {Name: "visibility", Require: plugin.Optional}, }, - ShouldIgnoreError: isNotFoundError([]string{"404"}), - ParentHydrate: tableGitHubPackageList, - Hydrate: tableGitHubPackageVersionList, + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + ParentHydrate: tableGitHubPackageList, + Hydrate: tableGitHubPackageVersionList, }, Get: &plugin.GetConfig{ - KeyColumns: plugin.AllColumns([]string{"organization", "package_name", "package_type", "id"}), - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubPackageVersionGet, + KeyColumns: plugin.AllColumns([]string{"organization", "package_name", "package_type", "id"}), + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubPackageVersionGet, }, Columns: commonColumns([]*plugin.Column{ {Name: "package_name", Type: proto.ColumnType_STRING, Description: "Name of the package."}, diff --git a/github/table_github_project_v2.go b/github/table_github_project_v2.go index 1ef8e3b..ec0d451 100644 --- a/github/table_github_project_v2.go +++ b/github/table_github_project_v2.go @@ -68,8 +68,8 @@ func tableGitHubProjectV2() *plugin.Table { Operators: []string{">", ">="}, }, }, - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubProjectV2List, + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubProjectV2List, }, Get: &plugin.GetConfig{ KeyColumns: plugin.KeyColumnSlice{ @@ -86,8 +86,8 @@ func tableGitHubProjectV2() *plugin.Table { Require: plugin.AnyOf, }, }, - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubProjectV2Get, + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubProjectV2Get, }, Columns: commonColumns(gitHubProjectV2Columns()), } diff --git a/github/table_github_pull_request.go b/github/table_github_pull_request.go index d12992e..47c0b02 100644 --- a/github/table_github_pull_request.go +++ b/github/table_github_pull_request.go @@ -100,13 +100,13 @@ func tableGitHubPullRequest() *plugin.Table { {Name: "repository_full_name", Require: plugin.Required}, {Name: "state", Require: plugin.Optional}, }, - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubPullRequestList, + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubPullRequestList, }, Get: &plugin.GetConfig{ - KeyColumns: plugin.AllColumns([]string{"repository_full_name", "number"}), - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubPullRequestGet, + KeyColumns: plugin.AllColumns([]string{"repository_full_name", "number"}), + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubPullRequestGet, }, Columns: commonColumns(gitHubPullRequestColumns()), } diff --git a/github/table_github_pull_request_comment.go b/github/table_github_pull_request_comment.go index dad7fdd..01608f8 100644 --- a/github/table_github_pull_request_comment.go +++ b/github/table_github_pull_request_comment.go @@ -13,9 +13,9 @@ func tableGitHubPullRequestComment() *plugin.Table { Name: "github_pull_request_comment", Description: "Comments are the responses/comments on Pull Requests.", List: &plugin.ListConfig{ - KeyColumns: plugin.AllColumns([]string{"repository_full_name", "number"}), - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubRepositoryPullRequestCommentList, + KeyColumns: plugin.AllColumns([]string{"repository_full_name", "number"}), + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubRepositoryPullRequestCommentList, }, Columns: commonColumns(sharedCommentsColumns()), } diff --git a/github/table_github_pull_request_review.go b/github/table_github_pull_request_review.go index 2cc12c3..f0c9649 100644 --- a/github/table_github_pull_request_review.go +++ b/github/table_github_pull_request_review.go @@ -32,9 +32,9 @@ func tableGitHubPullRequestReview() *plugin.Table { Name: "github_pull_request_review", Description: "Pull Request Reviews are groups of pull request review comments on a pull request.", List: &plugin.ListConfig{ - KeyColumns: plugin.AllColumns([]string{"repository_full_name", "number"}), - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubRepositoryPullRequestReviewList, + KeyColumns: plugin.AllColumns([]string{"repository_full_name", "number"}), + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubRepositoryPullRequestReviewList, }, Columns: commonColumns(pullRequestReviewColumns()), } diff --git a/github/table_github_release.go b/github/table_github_release.go index e1ab9ec..7c8af10 100644 --- a/github/table_github_release.go +++ b/github/table_github_release.go @@ -15,14 +15,14 @@ func tableGitHubRelease() *plugin.Table { Name: "github_release", Description: "GitHub Releases bundle project files for download by users.", List: &plugin.ListConfig{ - KeyColumns: plugin.SingleColumn("repository_full_name"), - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubReleaseList, + KeyColumns: plugin.SingleColumn("repository_full_name"), + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubReleaseList, }, Get: &plugin.GetConfig{ - KeyColumns: plugin.AllColumns([]string{"repository_full_name", "id"}), - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubReleaseGet, + KeyColumns: plugin.AllColumns([]string{"repository_full_name", "id"}), + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubReleaseGet, }, Columns: commonColumns([]*plugin.Column{ diff --git a/github/table_github_repository.go b/github/table_github_repository.go index 47cd262..b743e5c 100644 --- a/github/table_github_repository.go +++ b/github/table_github_repository.go @@ -109,9 +109,9 @@ func tableGitHubRepository() *plugin.Table { Name: "github_repository", Description: "GitHub Repositories contain all of your project's files and each file's revision history.", List: &plugin.ListConfig{ - Hydrate: tableGitHubRepositoryList, - ShouldIgnoreError: isNotFoundError([]string{"404"}), - KeyColumns: plugin.SingleColumn("full_name"), + Hydrate: tableGitHubRepositoryList, + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + KeyColumns: plugin.SingleColumn("full_name"), }, Columns: commonColumns(gitHubRepositoryColumns()), } diff --git a/github/table_github_repository_collaborator.go b/github/table_github_repository_collaborator.go index 6294d67..3a581dd 100644 --- a/github/table_github_repository_collaborator.go +++ b/github/table_github_repository_collaborator.go @@ -26,8 +26,8 @@ func tableGitHubRepositoryCollaborator() *plugin.Table { Name: "github_repository_collaborator", Description: "Collaborators are users that have contributed to the repository.", List: &plugin.ListConfig{ - Hydrate: tableGitHubRepositoryCollaboratorList, - ShouldIgnoreError: isNotFoundError([]string{"404"}), + Hydrate: tableGitHubRepositoryCollaboratorList, + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, KeyColumns: []*plugin.KeyColumn{ { Name: "repository_full_name", diff --git a/github/table_github_repository_content.go b/github/table_github_repository_content.go index 1628bb3..eeea352 100644 --- a/github/table_github_repository_content.go +++ b/github/table_github_repository_content.go @@ -19,13 +19,13 @@ func tableGitHubRepositoryContent() *plugin.Table { Name: "github_repository_content", Description: "List the content in a repository (list directory, or get file content", Get: &plugin.GetConfig{ - Hydrate: tableGitHubRepositoryContentGet, - ShouldIgnoreError: isNotFoundError([]string{"404"}), - KeyColumns: plugin.AllColumns([]string{"repository_full_name", "path"}), + Hydrate: tableGitHubRepositoryContentGet, + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + KeyColumns: plugin.AllColumns([]string{"repository_full_name", "path"}), }, List: &plugin.ListConfig{ - Hydrate: tableGitHubRepositoryContentList, - ShouldIgnoreError: isNotFoundError([]string{"404"}), + Hydrate: tableGitHubRepositoryContentList, + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, KeyColumns: []*plugin.KeyColumn{ {Name: "repository_full_name", Require: plugin.Required}, {Name: "repository_content_path", Require: plugin.Optional, CacheMatch: "exact"}, diff --git a/github/table_github_repository_dependabot_alert.go b/github/table_github_repository_dependabot_alert.go index bcc5a9f..d0bb96f 100644 --- a/github/table_github_repository_dependabot_alert.go +++ b/github/table_github_repository_dependabot_alert.go @@ -40,13 +40,13 @@ func tableGitHubRepositoryDependabotAlert() *plugin.Table { Require: plugin.Optional, }, }, - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubRepositoryDependabotAlertList, + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubRepositoryDependabotAlertList, }, Get: &plugin.GetConfig{ - KeyColumns: plugin.AllColumns([]string{"repository_full_name", "alert_number"}), - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubRepositoryDependabotAlertGet, + KeyColumns: plugin.AllColumns([]string{"repository_full_name", "alert_number"}), + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubRepositoryDependabotAlertGet, }, Columns: commonColumns(append( gitHubDependabotAlertColumns(), diff --git a/github/table_github_repository_deployment.go b/github/table_github_repository_deployment.go index 1e45f9e..01a9643 100644 --- a/github/table_github_repository_deployment.go +++ b/github/table_github_repository_deployment.go @@ -42,8 +42,8 @@ func tableGitHubRepositoryDeployment() *plugin.Table { Require: plugin.Required, }, }, - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubRepositoryDeploymentList, + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubRepositoryDeploymentList, }, Columns: commonColumns(gitHubRepositoryDeploymentColumns()), } diff --git a/github/table_github_repository_discussion.go b/github/table_github_repository_discussion.go index f933869..1e464dc 100644 --- a/github/table_github_repository_discussion.go +++ b/github/table_github_repository_discussion.go @@ -42,13 +42,13 @@ func tableGitHubRepositoryDiscussion() *plugin.Table { Require: plugin.Required, }, }, - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubRepositoryDiscussionList, + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubRepositoryDiscussionList, }, Get: &plugin.GetConfig{ - KeyColumns: plugin.AllColumns([]string{"repository_full_name", "number"}), - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubRepositoryDiscussionGet, + KeyColumns: plugin.AllColumns([]string{"repository_full_name", "number"}), + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubRepositoryDiscussionGet, }, Columns: commonColumns(gitHubRepositoryDiscussionColumns()), } diff --git a/github/table_github_repository_environment.go b/github/table_github_repository_environment.go index 033d8fc..9cc3125 100644 --- a/github/table_github_repository_environment.go +++ b/github/table_github_repository_environment.go @@ -30,8 +30,8 @@ func tableGitHubRepositoryEnvironment() *plugin.Table { Require: plugin.Required, }, }, - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubRepositoryEnvironmentList, + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubRepositoryEnvironmentList, }, Columns: commonColumns(gitHubRepositoryEnvironmentColumns()), } diff --git a/github/table_github_repository_sbom.go b/github/table_github_repository_sbom.go index dc71d16..14a2975 100644 --- a/github/table_github_repository_sbom.go +++ b/github/table_github_repository_sbom.go @@ -19,8 +19,8 @@ func tableGitHubRepositorySbom() *plugin.Table { Require: plugin.Required, }, }, - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: listRepositorySboms, + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: listRepositorySboms, }, Columns: commonColumns([]*plugin.Column{ { @@ -75,7 +75,7 @@ func tableGitHubRepositorySbom() *plugin.Table { } } -//// LIST FUNCTION +// // LIST FUNCTION func listRepositorySboms(ctx context.Context, d *plugin.QueryData, h *plugin.HydrateData) (interface{}, error) { var owner, repo string @@ -95,4 +95,4 @@ func listRepositorySboms(ctx context.Context, d *plugin.QueryData, h *plugin.Hyd d.StreamListItem(ctx, sbom.SBOM) return sbom, nil -} \ No newline at end of file +} diff --git a/github/table_github_repository_vulnerability_alert.go b/github/table_github_repository_vulnerability_alert.go index dde8de8..a803d20 100644 --- a/github/table_github_repository_vulnerability_alert.go +++ b/github/table_github_repository_vulnerability_alert.go @@ -16,8 +16,8 @@ func tableGitHubRepositoryVulnerabilityAlert() *plugin.Table { Name: "github_repository_vulnerability_alert", Description: "Vulnerability Alerts from a repository.", List: &plugin.ListConfig{ - Hydrate: tableGitHubRepositoryVulnerabilityList, - ShouldIgnoreError: isNotFoundError([]string{"404"}), + Hydrate: tableGitHubRepositoryVulnerabilityList, + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, KeyColumns: []*plugin.KeyColumn{ { Name: "repository_full_name", diff --git a/github/table_github_search_label.go b/github/table_github_search_label.go index d697b24..1f4878b 100644 --- a/github/table_github_search_label.go +++ b/github/table_github_search_label.go @@ -16,9 +16,9 @@ func tableGitHubSearchLabel() *plugin.Table { Name: "github_search_label", Description: "Find labels in a repository with names or descriptions that match search keywords.", List: &plugin.ListConfig{ - KeyColumns: plugin.AllColumns([]string{"query", "repository_id"}), - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubSearchLabelList, + KeyColumns: plugin.AllColumns([]string{"query", "repository_id"}), + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubSearchLabelList, }, Columns: commonColumns([]*plugin.Column{ {Name: "id", Transform: transform.FromField("ID"), Type: proto.ColumnType_INT, Description: "The ID of the label."}, diff --git a/github/table_github_stargazer.go b/github/table_github_stargazer.go index 4b79afa..63c7f01 100644 --- a/github/table_github_stargazer.go +++ b/github/table_github_stargazer.go @@ -16,9 +16,9 @@ func tableGitHubStargazer() *plugin.Table { Name: "github_stargazer", Description: "Stargazers are users who have starred the repository.", List: &plugin.ListConfig{ - KeyColumns: plugin.SingleColumn("repository_full_name"), - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubStargazerList, + KeyColumns: plugin.SingleColumn("repository_full_name"), + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubStargazerList, }, Columns: commonColumns([]*plugin.Column{ {Name: "repository_full_name", Type: proto.ColumnType_STRING, Transform: transform.FromQual("repository_full_name"), Description: "Full name of the repository that contains the stargazer."}, diff --git a/github/table_github_tag.go b/github/table_github_tag.go index b59c4ba..3ee349c 100644 --- a/github/table_github_tag.go +++ b/github/table_github_tag.go @@ -17,9 +17,9 @@ func tableGitHubTag() *plugin.Table { Name: "github_tag", Description: "Tags for commits in the given repository.", List: &plugin.ListConfig{ - KeyColumns: plugin.SingleColumn("repository_full_name"), - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubTagList, + KeyColumns: plugin.SingleColumn("repository_full_name"), + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubTagList, }, Columns: commonColumns([]*plugin.Column{ {Name: "repository_full_name", Type: proto.ColumnType_STRING, Transform: transform.FromQual("repository_full_name"), Description: "Full name of the repository that contains the tag."}, diff --git a/github/table_github_team.go b/github/table_github_team.go index 7ddf679..7f3bb9e 100644 --- a/github/table_github_team.go +++ b/github/table_github_team.go @@ -49,14 +49,14 @@ func tableGitHubTeam() *plugin.Table { Name: "github_team", Description: "GitHub Teams in a given organization. GitHub Teams are groups of organization members that reflect your company or group's structure with cascading access permissions and mentions.", List: &plugin.ListConfig{ - KeyColumns: plugin.SingleColumn("organization"), - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubTeamList, + KeyColumns: plugin.SingleColumn("organization"), + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubTeamList, }, Get: &plugin.GetConfig{ - KeyColumns: plugin.AllColumns([]string{"organization", "slug"}), - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubTeamGet, + KeyColumns: plugin.AllColumns([]string{"organization", "slug"}), + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubTeamGet, }, Columns: commonColumns(gitHubTeamColumns()), } diff --git a/github/table_github_team_member.go b/github/table_github_team_member.go index 843300b..f3a9d4d 100644 --- a/github/table_github_team_member.go +++ b/github/table_github_team_member.go @@ -22,8 +22,8 @@ func tableGitHubTeamMember() *plugin.Table { {Name: "slug", Require: plugin.Required}, {Name: "role", Require: plugin.Optional}, }, - Hydrate: tableGitHubTeamMemberList, - ShouldIgnoreError: isNotFoundError([]string{"404"}), + Hydrate: tableGitHubTeamMemberList, + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, }, Columns: commonColumns(gitHubTeamMemberColumns()), } diff --git a/github/table_github_team_repository.go b/github/table_github_team_repository.go index 4b7bdc4..771fe88 100644 --- a/github/table_github_team_repository.go +++ b/github/table_github_team_repository.go @@ -31,8 +31,8 @@ func tableGitHubTeamRepository() *plugin.Table { {Name: "organization", Require: plugin.Required}, {Name: "slug", Require: plugin.Required}, }, - Hydrate: tableGitHubTeamRepositoryList, - ShouldIgnoreError: isNotFoundError([]string{"404"}), + Hydrate: tableGitHubTeamRepositoryList, + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, }, Get: &plugin.GetConfig{ KeyColumns: []*plugin.KeyColumn{ @@ -40,8 +40,8 @@ func tableGitHubTeamRepository() *plugin.Table { {Name: "slug", Require: plugin.Required}, {Name: "name", Require: plugin.Required}, }, - Hydrate: tableGitHubTeamRepositoryGet, - ShouldIgnoreError: isNotFoundError([]string{"404"}), + Hydrate: tableGitHubTeamRepositoryGet, + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, }, Columns: commonColumns(gitHubTeamRepositoryColumns()), } diff --git a/github/table_github_traffic_clone_daily.go b/github/table_github_traffic_clone_daily.go index 1a6d58d..7dda157 100644 --- a/github/table_github_traffic_clone_daily.go +++ b/github/table_github_traffic_clone_daily.go @@ -15,9 +15,9 @@ func tableGitHubTrafficCloneDaily() *plugin.Table { Name: "github_traffic_clone_daily", Description: "Daily traffic clone stats over the last 14 days for the given repository.", List: &plugin.ListConfig{ - KeyColumns: plugin.SingleColumn("repository_full_name"), - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubTrafficCloneDailyList, + KeyColumns: plugin.SingleColumn("repository_full_name"), + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubTrafficCloneDailyList, }, Columns: commonColumns([]*plugin.Column{ // Top columns diff --git a/github/table_github_traffic_clone_weekly.go b/github/table_github_traffic_clone_weekly.go index ad55eae..aaeeecf 100644 --- a/github/table_github_traffic_clone_weekly.go +++ b/github/table_github_traffic_clone_weekly.go @@ -15,9 +15,9 @@ func tableGitHubTrafficCloneWeekly() *plugin.Table { Name: "github_traffic_clone_weekly", Description: "Weekly traffic clone stats over the last 14 days for the given repository.", List: &plugin.ListConfig{ - KeyColumns: plugin.SingleColumn("repository_full_name"), - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubTrafficCloneWeeklyList, + KeyColumns: plugin.SingleColumn("repository_full_name"), + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubTrafficCloneWeeklyList, }, Columns: commonColumns([]*plugin.Column{ // Top columns diff --git a/github/table_github_traffic_view_daily.go b/github/table_github_traffic_view_daily.go index 6a78646..3202bf2 100644 --- a/github/table_github_traffic_view_daily.go +++ b/github/table_github_traffic_view_daily.go @@ -15,9 +15,9 @@ func tableGitHubTrafficViewDaily() *plugin.Table { Name: "github_traffic_view_daily", Description: "Daily traffic view over the last 14 days for the given repository.", List: &plugin.ListConfig{ - KeyColumns: plugin.SingleColumn("repository_full_name"), - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubTrafficViewDailyList, + KeyColumns: plugin.SingleColumn("repository_full_name"), + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubTrafficViewDailyList, }, Columns: commonColumns([]*plugin.Column{ // Top columns diff --git a/github/table_github_traffic_view_weekly.go b/github/table_github_traffic_view_weekly.go index b24e454..0e18884 100644 --- a/github/table_github_traffic_view_weekly.go +++ b/github/table_github_traffic_view_weekly.go @@ -15,9 +15,9 @@ func tableGitHubTrafficViewWeekly() *plugin.Table { Name: "github_traffic_view_weekly", Description: "Weekly traffic view over the last 14 days for the given repository.", List: &plugin.ListConfig{ - KeyColumns: plugin.SingleColumn("repository_full_name"), - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubTrafficViewWeeklyList, + KeyColumns: plugin.SingleColumn("repository_full_name"), + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubTrafficViewWeeklyList, }, Columns: commonColumns([]*plugin.Column{ // Top columns diff --git a/github/table_github_tree.go b/github/table_github_tree.go index 882fda7..47eccfa 100644 --- a/github/table_github_tree.go +++ b/github/table_github_tree.go @@ -15,8 +15,8 @@ func tableGitHubTree() *plugin.Table { Name: "github_tree", Description: "Lists directories and files in the given repository's git tree.", List: &plugin.ListConfig{ - Hydrate: tableGitHubTreeList, - ShouldIgnoreError: isNotFoundError([]string{"404"}), + Hydrate: tableGitHubTreeList, + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, KeyColumns: []*plugin.KeyColumn{ {Name: "repository_full_name", Require: plugin.Required}, {Name: "tree_sha", Require: plugin.Required}, diff --git a/github/table_github_user.go b/github/table_github_user.go index 4036309..a4d11ac 100644 --- a/github/table_github_user.go +++ b/github/table_github_user.go @@ -17,9 +17,9 @@ func tableGitHubUser() *plugin.Table { Name: "github_user", Description: "GitHub Users are user accounts in GitHub.", List: &plugin.ListConfig{ - KeyColumns: plugin.SingleColumn("login"), - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubUserGet, + KeyColumns: plugin.SingleColumn("login"), + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubUserGet, }, Columns: commonColumns(tableGitHubUserColumns()), } diff --git a/github/table_github_workflow.go b/github/table_github_workflow.go index f77a262..f97b9c2 100644 --- a/github/table_github_workflow.go +++ b/github/table_github_workflow.go @@ -21,14 +21,14 @@ func tableGitHubWorkflow() *plugin.Table { Name: "github_workflow", Description: "GitHub Workflows bundle project files for download by users.", List: &plugin.ListConfig{ - KeyColumns: plugin.SingleColumn("repository_full_name"), - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubWorkflowList, + KeyColumns: plugin.SingleColumn("repository_full_name"), + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubWorkflowList, }, Get: &plugin.GetConfig{ - KeyColumns: plugin.AllColumns([]string{"repository_full_name", "id"}), - ShouldIgnoreError: isNotFoundError([]string{"404"}), - Hydrate: tableGitHubWorkflowGet, + KeyColumns: plugin.AllColumns([]string{"repository_full_name", "id"}), + IgnoreConfig: &plugin.IgnoreConfig{ShouldIgnoreErrorFunc: isNotFoundError([]string{"404"})}, + Hydrate: tableGitHubWorkflowGet, }, Columns: commonColumns([]*plugin.Column{ // Top columns