From 09514b7c15e7703d44f772475f459a93333479f0 Mon Sep 17 00:00:00 2001 From: Graza Date: Wed, 20 Sep 2023 21:00:10 +0100 Subject: [PATCH] Update `github_my_repository`, `github_repository`, and `github_search_repository` tables to only include requested columns in GraphQL request (#338) --- github/models/repository.go | 134 +++++++------- github/table_github_my_repository.go | 1 + github/table_github_repository.go | 225 ++++++++++++++++------- github/table_github_search_repository.go | 1 + go.mod | 2 +- go.sum | 24 +++ 6 files changed, 251 insertions(+), 136 deletions(-) diff --git a/github/models/repository.go b/github/models/repository.go index 96b1fe7f..a0f9f39e 100644 --- a/github/models/repository.go +++ b/github/models/repository.go @@ -4,77 +4,77 @@ import "github.com/shurcooL/githubv4" type Repository struct { basicIdentifiers - AllowUpdateBranch bool `json:"allow_update_branch"` - ArchivedAt NullableTime `json:"archived_at"` - AutoMergeAllowed bool `json:"auto_merge_allowed"` - CodeOfConduct RepositoryCodeOfConduct `json:"code_of_conduct"` - ContactLinks []RepositoryContactLink `json:"contact_links"` - CreatedAt NullableTime `json:"created_at"` - DefaultBranchRef BasicRefWithBranchProtectionRule `json:"default_branch_ref"` - DeleteBranchOnMerge bool `json:"delete_branch_on_merge"` - Description string `json:"description"` - DiskUsage int `json:"disk_usage "` - ForkCount int `json:"fork_count"` - ForkingAllowed bool `json:"forking_allowed"` - FundingLinks []RepositoryFundingLinks `json:"funding_links"` - HasDiscussionsEnabled bool `json:"has_discussions_enabled"` - HasIssuesEnabled bool `json:"has_issues_enabled"` - HasProjectsEnabled bool `json:"has_projects_enabled"` - HasVulnerabilityAlertsEnabled bool `json:"has_vulnerability_alerts_enabled"` - HasWikiEnabled bool `json:"has_wiki_enabled"` - HomepageUrl string `json:"homepage_url"` - InteractionAbility RepositoryInteractionAbility `json:"interaction_ability"` - IsArchived bool `json:"is_archived"` - IsBlankIssuesEnabled bool `json:"is_blank_issues_enabled"` - IsDisabled bool `json:"is_disabled"` - IsEmpty bool `json:"is_empty"` - IsFork bool `json:"is_fork"` - IsInOrganization bool `json:"is_in_organization"` - IsLocked bool `json:"is_locked"` - IsMirror bool `json:"is_mirror"` - IsPrivate bool `json:"is_private"` - IsSecurityPolicyEnabled bool `json:"is_security_policy_enabled"` - IsTemplate bool `json:"is_template"` - IsUserConfigurationRepository bool `json:"is_user_configuration_repository"` - IssueTemplates []IssueTemplate `json:"issue_templates"` - LicenseInfo BasicLicense `json:"license_info"` - LockReason githubv4.LockReason `json:"lock_reason"` - MergeCommitAllowed bool `json:"merge_commit_allowed"` - MergeCommitMessage githubv4.MergeCommitMessage `json:"merge_commit_message"` - MergeCommitTitle githubv4.MergeCommitTitle `json:"merge_commit_title"` - MirrorUrl string `json:"mirror_url"` + AllowUpdateBranch bool `graphql:"allowUpdateBranch @include(if:$includeAllowUpdateBranch)" json:"allow_update_branch"` + ArchivedAt NullableTime `graphql:"archivedAt @include(if:$includeArchivedAt)" json:"archived_at"` + AutoMergeAllowed bool `graphql:"autoMergeAllowed @include(if:$includeAutoMergeAllowed)" json:"auto_merge_allowed"` + CodeOfConduct RepositoryCodeOfConduct `graphql:"codeOfConduct @include(if:$includeCodeOfConduct)" json:"code_of_conduct"` + ContactLinks []RepositoryContactLink `graphql:"contactLinks @include(if:$includeContactLinks)" json:"contact_links"` + CreatedAt NullableTime `graphql:"createdAt @include(if:$includeCreatedAt)" json:"created_at"` + DefaultBranchRef BasicRefWithBranchProtectionRule `graphql:"defaultBranchRef @include(if:$includeDefaultBranchRef)" json:"default_branch_ref"` + DeleteBranchOnMerge bool `graphql:"deleteBranchOnMerge @include(if:$includeDeleteBranchOnMerge)" json:"delete_branch_on_merge"` + Description string `graphql:"description @include(if:$includeDescription)" json:"description"` + DiskUsage int `graphql:"diskUsage @include(if:$includeDiskUsage)" json:"disk_usage "` + ForkCount int `graphql:"forkCount @include(if:$includeForkCount)" json:"fork_count"` + ForkingAllowed bool `graphql:"forkingAllowed @include(if:$includeForkingAllowed)" json:"forking_allowed"` + FundingLinks []RepositoryFundingLinks `graphql:"fundingLinks @include(if:$includeFundingLinks)" json:"funding_links"` + HasDiscussionsEnabled bool `graphql:"hasDiscussionsEnabled @include(if:$includeHasDiscussionsEnabled)" json:"has_discussions_enabled"` + HasIssuesEnabled bool `graphql:"hasIssuesEnabled @include(if:$includeHasIssuesEnabled)" json:"has_issues_enabled"` + HasProjectsEnabled bool `graphql:"hasProjectsEnabled @include(if:$includeHasProjectsEnabled)" json:"has_projects_enabled"` + HasVulnerabilityAlertsEnabled bool `graphql:"hasVulnerabilityAlertsEnabled @include(if:$includeHasVulnerabilityAlertsEnabled)" json:"has_vulnerability_alerts_enabled"` + HasWikiEnabled bool `graphql:"hasWikiEnabled @include(if:$includeHasWikiEnabled)" json:"has_wiki_enabled"` + HomepageUrl string `graphql:"homepageUrl @include(if:$includeHomepageUrl)" json:"homepage_url"` + InteractionAbility RepositoryInteractionAbility `graphql:"interactionAbility @include(if:$includeInteractionAbility)" json:"interaction_ability"` + IsArchived bool `graphql:"isArchived @include(if:$includeIsArchived)" json:"is_archived"` + IsBlankIssuesEnabled bool `graphql:"isBlankIssuesEnabled @include(if:$includeIsBlankIssuesEnabled)" json:"is_blank_issues_enabled"` + IsDisabled bool `graphql:"isDisabled @include(if:$includeIsDisabled)" json:"is_disabled"` + IsEmpty bool `graphql:"isEmpty @include(if:$includeIsEmpty)" json:"is_empty"` + IsFork bool `graphql:"isFork @include(if:$includeIsFork)" json:"is_fork"` + IsInOrganization bool `graphql:"isInOrganization @include(if:$includeIsInOrganization)" json:"is_in_organization"` + IsLocked bool `graphql:"isLocked @include(if:$includeIsLocked)" json:"is_locked"` + IsMirror bool `graphql:"isMirror @include(if:$includeIsMirror)" json:"is_mirror"` + IsPrivate bool `graphql:"isPrivate @include(if:$includeIsPrivate)" json:"is_private"` + IsSecurityPolicyEnabled bool `graphql:"isSecurityPolicyEnabled @include(if:$includeIsSecurityPolicyEnabled)" json:"is_security_policy_enabled"` + IsTemplate bool `graphql:"isTemplate @include(if:$includeIsTemplate)" json:"is_template"` + IsUserConfigurationRepository bool `graphql:"isUserConfigurationRepository @include(if:$includeIsUserConfigurationRepository)" json:"is_user_configuration_repository"` + IssueTemplates []IssueTemplate `graphql:"issueTemplates @include(if:$includeIssueTemplates)" json:"issue_templates"` + LicenseInfo BasicLicense `graphql:"licenseInfo @include(if:$includeLicenseInfo)" json:"license_info"` + LockReason githubv4.LockReason `graphql:"lockReason @include(if:$includeLockReason)" json:"lock_reason"` + MergeCommitAllowed bool `graphql:"mergeCommitAllowed @include(if:$includeMergeCommitAllowed)" json:"merge_commit_allowed"` + MergeCommitMessage githubv4.MergeCommitMessage `graphql:"mergeCommitMessage @include(if:$includeMergeCommitMessage)" json:"merge_commit_message"` + MergeCommitTitle githubv4.MergeCommitTitle `graphql:"mergeCommitTitle @include(if:$includeMergeCommitTitle)" json:"merge_commit_title"` + MirrorUrl string `graphql:"mirrorUrl @include(if:$includeMirrorUrl)" json:"mirror_url"` NameWithOwner string `json:"name_with_owner"` - OpenGraphImageUrl string `json:"open_graph_image_url"` + OpenGraphImageUrl string `graphql:"openGraphImageUrl @include(if:$includeOpenGraphImageUrl)" json:"open_graph_image_url"` Owner struct { Login string `json:"login"` } `json:"owner"` - PrimaryLanguage Language `json:"primary_language"` - ProjectsUrl string `json:"projects_url"` - PullRequestTemplates []PullRequestTemplate `json:"pull_request_templates"` - PushedAt NullableTime `json:"pushed_at"` - RebaseMergeAllowed bool `json:"rebase_merge_allowed"` - SecurityPolicyUrl string `json:"security_policy_url"` - SquashMergeAllowed bool `json:"squash_merge_allowed"` - SquashMergeCommitMessage githubv4.SquashMergeCommitMessage `json:"squash_merge_commit_message"` - SquashMergeCommitTitle githubv4.SquashMergeCommitTitle `json:"squash_merge_commit_title"` - SshUrl string `json:"ssh_url"` - StargazerCount int `json:"stargazer_count"` - UpdatedAt NullableTime `json:"updated_at"` - Url string `json:"url"` - UsesCustomOpenGraphImage bool `json:"uses_custom_open_graph_image"` - CanAdminister bool `graphql:"canAdminister: viewerCanAdminister" json:"can_administer"` - CanCreateProjects bool `graphql:"canCreateProjects: viewerCanCreateProjects" json:"can_create_projects"` - CanSubscribe bool `graphql:"canSubscribe: viewerCanSubscribe" json:"can_subscribe"` - CanUpdateTopics bool `graphql:"canUpdateTopics: viewerCanUpdateTopics" json:"can_update_topics"` - HasStarred bool `graphql:"hasStarred: viewerHasStarred" json:"has_starred"` - YourPermission githubv4.RepositoryPermission `graphql:"yourPermission: viewerPermission" json:"your_permission"` - PossibleCommitEmails []string `graphql:"possibleCommitEmails: viewerPossibleCommitEmails" json:"possible_commit_emails"` - Subscription githubv4.SubscriptionState `graphql:"subscription: viewerSubscription" json:"subscription"` - Visibility githubv4.RepositoryVisibility `json:"visibility"` - WebCommitSignoffRequired bool `json:"web_commit_signoff_required"` - RepositoryTopics Count `json:"repository_topics"` - OpenIssues Count `graphql:"issues(states: OPEN)" json:"open_issues"` - Watchers Count `json:"watchers"` + PrimaryLanguage Language `graphql:"primaryLanguage @include(if:$includePrimaryLanguage)" json:"primary_language"` + ProjectsUrl string `graphql:"projectsUrl @include(if:$includeProjectsUrl)" json:"projects_url"` + PullRequestTemplates []PullRequestTemplate `graphql:"pullRequestTemplates @include(if:$includePullRequestTemplates)" json:"pull_request_templates"` + PushedAt NullableTime `graphql:"pushedAt @include(if:$includePushedAt)" json:"pushed_at"` + RebaseMergeAllowed bool `graphql:"rebaseMergeAllowed @include(if:$includeRebaseMergeAllowed)" json:"rebase_merge_allowed"` + SecurityPolicyUrl string `graphql:"securityPolicyUrl @include(if:$includeSecurityPolicyUrl)" json:"security_policy_url"` + SquashMergeAllowed bool `graphql:"squashMergeAllowed @include(if:$includeSquashMergeAllowed)" json:"squash_merge_allowed"` + SquashMergeCommitMessage githubv4.SquashMergeCommitMessage `graphql:"squashMergeCommitMessage @include(if:$includeSquashMergeCommitMessage)" json:"squash_merge_commit_message"` + SquashMergeCommitTitle githubv4.SquashMergeCommitTitle `graphql:"squashMergeCommitTitle @include(if:$includeSquashMergeCommitTitle)" json:"squash_merge_commit_title"` + SshUrl string `graphql:"sshUrl @include(if:$includeSshUrl)" json:"ssh_url"` + StargazerCount int `graphql:"stargazerCount @include(if:$includeStargazerCount)" json:"stargazer_count"` + UpdatedAt NullableTime `graphql:"updatedAt @include(if:$includeUpdatedAt)" json:"updated_at"` + Url string `graphql:"url @include(if:$includeUrl)" json:"url"` + UsesCustomOpenGraphImage bool `graphql:"usesCustomOpenGraphImage @include(if:$includeUsesCustomOpenGraphImage)" json:"uses_custom_open_graph_image"` + CanAdminister bool `graphql:"canAdminister: viewerCanAdminister @include(if:$includeCanAdminister)" json:"can_administer"` + CanCreateProjects bool `graphql:"canCreateProjects: viewerCanCreateProjects @include(if:$includeCanCreateProjects)" json:"can_create_projects"` + CanSubscribe bool `graphql:"canSubscribe: viewerCanSubscribe @include(if:$includeCanSubscribe)" json:"can_subscribe"` + CanUpdateTopics bool `graphql:"canUpdateTopics: viewerCanUpdateTopics @include(if:$includeCanUpdateTopics)" json:"can_update_topics"` + HasStarred bool `graphql:"hasStarred: viewerHasStarred @include(if:$includeHasStarred)" json:"has_starred"` + YourPermission githubv4.RepositoryPermission `graphql:"yourPermission: viewerPermission @include(if:$includeYourPermission)" json:"your_permission"` + PossibleCommitEmails []string `graphql:"possibleCommitEmails: viewerPossibleCommitEmails @include(if:$includePossibleCommitEmails)" json:"possible_commit_emails"` + Subscription githubv4.SubscriptionState `graphql:"subscription: viewerSubscription @include(if:$includeSubscription)" json:"subscription"` + Visibility githubv4.RepositoryVisibility `graphql:"visibility @include(if:$includeVisibility)" json:"visibility"` + WebCommitSignoffRequired bool `graphql:"webCommitSignoffRequired @include(if:$includeWebCommitSignoffRequired)" json:"web_commit_signoff_required"` + RepositoryTopics Count `graphql:"repositoryTopics @include(if:$includeRepositoryTopics)" json:"repository_topics"` + OpenIssues Count `graphql:"issues(states: OPEN) @include(if:$includeOpenIssues)" json:"open_issues"` + Watchers Count `graphql:"watchers @include(if:$includeWatchers)" json:"watchers"` // AssignableUsers [pageable] // BranchProtectionRules [pageable] // CodeOwners [search by refName] diff --git a/github/table_github_my_repository.go b/github/table_github_my_repository.go index ebb82420..20e637b8 100644 --- a/github/table_github_my_repository.go +++ b/github/table_github_my_repository.go @@ -39,6 +39,7 @@ func tableGitHubMyRepositoryList(ctx context.Context, d *plugin.QueryData, h *pl "pageSize": githubv4.Int(pageSize), "cursor": (*githubv4.String)(nil), } + appendRepoColumnIncludes(&variables, d.QueryContext.Columns) for { err := client.Query(ctx, &query, variables) diff --git a/github/table_github_repository.go b/github/table_github_repository.go index 61703a87..b8092f78 100644 --- a/github/table_github_repository.go +++ b/github/table_github_repository.go @@ -3,13 +3,15 @@ package github import ( "context" "fmt" + "slices" + "strings" + "github.com/google/go-github/v55/github" "github.com/shurcooL/githubv4" "github.com/turbot/steampipe-plugin-github/github/models" "github.com/turbot/steampipe-plugin-sdk/v5/grpc/proto" "github.com/turbot/steampipe-plugin-sdk/v5/plugin" "github.com/turbot/steampipe-plugin-sdk/v5/plugin/transform" - "strings" ) func gitHubRepositoryColumns() []*plugin.Column { @@ -24,75 +26,75 @@ func sharedRepositoryColumns() []*plugin.Column { {Name: "id", Type: proto.ColumnType_INT, Description: "The numeric ID of the repository.", Transform: transform.FromField("Id", "Node.Id")}, {Name: "node_id", Type: proto.ColumnType_STRING, Description: "The node ID of the repository.", Transform: transform.FromField("NodeId", "Node.NodeId")}, {Name: "name", Type: proto.ColumnType_STRING, Description: "The name of the repository.", Transform: transform.FromField("Name", "Node.Name")}, - {Name: "allow_update_branch", Type: proto.ColumnType_BOOL, Description: "If true, a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging.", Transform: transform.FromField("AllowUpdateBranch", "Node.AllowUpdateBranch")}, - {Name: "archived_at", Type: proto.ColumnType_TIMESTAMP, Description: "Timestamp when repository was archived.", Transform: transform.FromField("ArchivedAt", "Node.ArchivedAt").NullIfZero().Transform(convertTimestamp)}, - {Name: "auto_merge_allowed", Type: proto.ColumnType_BOOL, Transform: transform.FromField("AutoMergeAllowed", "Node.AutoMergeAllowed"), Description: "If true, auto-merge can be enabled on pull requests in this repository."}, - {Name: "code_of_conduct", Type: proto.ColumnType_JSON, Transform: transform.FromField("CodeOfConduct", "Node.CodeOfConduct").NullIfZero(), Description: "The code of conduct for this repository."}, - {Name: "contact_links", Type: proto.ColumnType_JSON, Transform: transform.FromField("ContactLinks", "Node.ContactLinks").NullIfZero(), Description: "List of contact links associated to the repository."}, - {Name: "created_at", Type: proto.ColumnType_TIMESTAMP, Transform: transform.FromField("CreatedAt", "Node.CreatedAt").NullIfZero().Transform(convertTimestamp), Description: "Timestamp when the repository was created."}, - {Name: "default_branch_ref", Type: proto.ColumnType_JSON, Transform: transform.FromField("DefaultBranchRef", "Node.DefaultBranchRef").NullIfZero(), Description: "Default ref information."}, - {Name: "delete_branch_on_merge", Type: proto.ColumnType_BOOL, Transform: transform.FromField("DeleteBranchOnMerge", "Node.DeleteBranchOnMerge"), Description: "If true, branches are automatically deleted when merged in this repository."}, - {Name: "description", Type: proto.ColumnType_STRING, Transform: transform.FromField("Description", "Node.Description"), Description: "The description of the repository."}, - {Name: "disk_usage", Type: proto.ColumnType_INT, Transform: transform.FromField("DiskUsage", "Node.DiskUsage"), Description: "Number of kilobytes this repository occupies on disk."}, - {Name: "fork_count", Type: proto.ColumnType_INT, Transform: transform.FromField("ForkCount", "Node.ForkCount"), Description: "Number of forks there are of this repository in the whole network."}, - {Name: "forking_allowed", Type: proto.ColumnType_BOOL, Transform: transform.FromField("ForkingAllowed", "Node.ForkingAllowed"), Description: "If true, repository allows forks."}, - {Name: "funding_links", Type: proto.ColumnType_JSON, Transform: transform.FromField("FundingLinks", "Node.FundingLinks").NullIfZero(), Description: "The funding links for this repository."}, - {Name: "has_discussions_enabled", Type: proto.ColumnType_BOOL, Transform: transform.FromField("HasDiscussionsEnabled", "Node.HasDiscussionsEnabled"), Description: "If true, the repository has the Discussions feature enabled."}, - {Name: "has_issues_enabled", Type: proto.ColumnType_BOOL, Transform: transform.FromField("HasIssuesEnabled", "Node.HasIssuesEnabled"), Description: "If true, the repository has issues feature enabled."}, - {Name: "has_projects_enabled", Type: proto.ColumnType_BOOL, Transform: transform.FromField("HasProjectsEnabled", "Node.HasProjectsEnabled"), Description: "If true, the repository has the Projects feature enabled."}, - {Name: "has_vulnerability_alerts_enabled", Type: proto.ColumnType_BOOL, Transform: transform.FromField("HasVulnerabilityAlertsEnabled", "Node.HasVulnerabilityAlertsEnabled"), Description: "If true, vulnerability alerts are enabled for the repository."}, - {Name: "has_wiki_enabled", Type: proto.ColumnType_BOOL, Transform: transform.FromField("HasWikiEnabled", "Node.HasWikiEnabled"), Description: "If true, the repository has wiki feature enabled."}, - {Name: "homepage_url", Type: proto.ColumnType_STRING, Transform: transform.FromField("HomepageUrl", "Node.HomepageUrl"), Description: "The external URL of the repository if set."}, - {Name: "interaction_ability", Type: proto.ColumnType_JSON, Transform: transform.FromField("InteractionAbility", "Node.InteractionAbility").NullIfZero(), Description: "The interaction ability settings for this repository."}, - {Name: "is_archived", Type: proto.ColumnType_BOOL, Transform: transform.FromField("IsArchived", "Node.IsArchived"), Description: "If true, the repository is unmaintained (archived)."}, - {Name: "is_blank_issues_enabled", Type: proto.ColumnType_BOOL, Transform: transform.FromField("IsBlankIssuesEnabled", "Node.IsBlankIssuesEnabled"), Description: "If true, blank issue creation is allowed."}, - {Name: "is_disabled", Type: proto.ColumnType_BOOL, Transform: transform.FromField("IsDisabled", "Node.IsDisabled"), Description: "If true, this repository disabled."}, - {Name: "is_empty", Type: proto.ColumnType_BOOL, Transform: transform.FromField("IsEmpty", "Node.IsEmpty"), Description: "If true, this repository is empty."}, - {Name: "is_fork", Type: proto.ColumnType_BOOL, Transform: transform.FromField("IsFork", "Node.IsFork"), Description: "If true, the repository is a fork."}, - {Name: "is_in_organization", Type: proto.ColumnType_BOOL, Transform: transform.FromField("IsInOrganization", "Node.IsInOrganization"), Description: "If true, repository is either owned by an organization, or is a private fork of an organization repository."}, - {Name: "is_locked", Type: proto.ColumnType_BOOL, Transform: transform.FromField("IsLocked", "Node.IsLocked"), Description: "If true, repository is locked."}, - {Name: "is_mirror", Type: proto.ColumnType_BOOL, Transform: transform.FromField("IsMirror", "Node.IsMirror"), Description: "If true, the repository is a mirror."}, - {Name: "is_private", Type: proto.ColumnType_BOOL, Transform: transform.FromField("IsPrivate", "Node.IsPrivate"), Description: "If true, the repository is private or internal."}, - {Name: "is_security_policy_enabled", Type: proto.ColumnType_BOOL, Transform: transform.FromField("IsSecurityPolicyEnabled", "Node.IsSecurityPolicyEnabled"), Description: "If true, repository has a security policy."}, - {Name: "is_template", Type: proto.ColumnType_BOOL, Transform: transform.FromField("IsTemplate", "Node.IsTemplate"), Description: "If true, the repository is a template that can be used to generate new repositories."}, - {Name: "is_user_configuration_repository", Type: proto.ColumnType_BOOL, Transform: transform.FromField("IsUserConfigurationRepository", "Node.IsUserConfigurationRepository"), Description: "If true, this is a user configuration repository."}, - {Name: "issue_templates", Type: proto.ColumnType_JSON, Transform: transform.FromField("IssueTemplates", "Node.IssueTemplates").NullIfZero(), Description: "A list of issue templates associated to the repository."}, - {Name: "license_info", Type: proto.ColumnType_JSON, Transform: transform.FromField("LicenseInfo", "Node.LicenseInfo").NullIfZero(), Description: "The license associated with the repository."}, - {Name: "lock_reason", Type: proto.ColumnType_STRING, Transform: transform.FromField("LockReason", "Node.LockReason"), Description: "The reason the repository has been locked."}, - {Name: "merge_commit_allowed", Type: proto.ColumnType_BOOL, Transform: transform.FromField("MergeCommitAllowed", "Node.MergeCommitAllowed"), Description: "If true, PRs are merged with a merge commit on this repository."}, - {Name: "merge_commit_message", Type: proto.ColumnType_STRING, Transform: transform.FromField("MergeCommitMessage", "Node.MergeCommitMessage"), Description: "How the default commit message will be generated when merging a pull request."}, - {Name: "merge_commit_title", Type: proto.ColumnType_STRING, Transform: transform.FromField("MergeCommitTitle", "Node.MergeCommitTitle"), Description: "How the default commit title will be generated when merging a pull request."}, - {Name: "mirror_url", Type: proto.ColumnType_STRING, Transform: transform.FromField("MirrorUrl", "Node.MirrorUrl"), Description: "The repository's original mirror URL."}, + {Name: "allow_update_branch", Type: proto.ColumnType_BOOL, Description: "If true, a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging.", Hydrate: hydrateForCache, Transform: transform.FromField("AllowUpdateBranch", "Node.AllowUpdateBranch")}, + {Name: "archived_at", Type: proto.ColumnType_TIMESTAMP, Description: "Timestamp when repository was archived.", Hydrate: hydrateForCache, Transform: transform.FromField("ArchivedAt", "Node.ArchivedAt").NullIfZero().Transform(convertTimestamp)}, + {Name: "auto_merge_allowed", Type: proto.ColumnType_BOOL, Hydrate: hydrateForCache, Transform: transform.FromField("AutoMergeAllowed", "Node.AutoMergeAllowed"), Description: "If true, auto-merge can be enabled on pull requests in this repository."}, + {Name: "code_of_conduct", Type: proto.ColumnType_JSON, Hydrate: hydrateForCache, Transform: transform.FromField("CodeOfConduct", "Node.CodeOfConduct").NullIfZero(), Description: "The code of conduct for this repository."}, + {Name: "contact_links", Type: proto.ColumnType_JSON, Hydrate: hydrateForCache, Transform: transform.FromField("ContactLinks", "Node.ContactLinks").NullIfZero(), Description: "List of contact links associated to the repository."}, + {Name: "created_at", Type: proto.ColumnType_TIMESTAMP, Hydrate: hydrateForCache, Transform: transform.FromField("CreatedAt", "Node.CreatedAt").NullIfZero().Transform(convertTimestamp), Description: "Timestamp when the repository was created."}, + {Name: "default_branch_ref", Type: proto.ColumnType_JSON, Hydrate: hydrateForCache, Transform: transform.FromField("DefaultBranchRef", "Node.DefaultBranchRef").NullIfZero(), Description: "Default ref information."}, + {Name: "delete_branch_on_merge", Type: proto.ColumnType_BOOL, Hydrate: hydrateForCache, Transform: transform.FromField("DeleteBranchOnMerge", "Node.DeleteBranchOnMerge"), Description: "If true, branches are automatically deleted when merged in this repository."}, + {Name: "description", Type: proto.ColumnType_STRING, Hydrate: hydrateForCache, Transform: transform.FromField("Description", "Node.Description"), Description: "The description of the repository."}, + {Name: "disk_usage", Type: proto.ColumnType_INT, Hydrate: hydrateForCache, Transform: transform.FromField("DiskUsage", "Node.DiskUsage"), Description: "Number of kilobytes this repository occupies on disk."}, + {Name: "fork_count", Type: proto.ColumnType_INT, Hydrate: hydrateForCache, Transform: transform.FromField("ForkCount", "Node.ForkCount"), Description: "Number of forks there are of this repository in the whole network."}, + {Name: "forking_allowed", Type: proto.ColumnType_BOOL, Hydrate: hydrateForCache, Transform: transform.FromField("ForkingAllowed", "Node.ForkingAllowed"), Description: "If true, repository allows forks."}, + {Name: "funding_links", Type: proto.ColumnType_JSON, Hydrate: hydrateForCache, Transform: transform.FromField("FundingLinks", "Node.FundingLinks").NullIfZero(), Description: "The funding links for this repository."}, + {Name: "has_discussions_enabled", Type: proto.ColumnType_BOOL, Hydrate: hydrateForCache, Transform: transform.FromField("HasDiscussionsEnabled", "Node.HasDiscussionsEnabled"), Description: "If true, the repository has the Discussions feature enabled."}, + {Name: "has_issues_enabled", Type: proto.ColumnType_BOOL, Hydrate: hydrateForCache, Transform: transform.FromField("HasIssuesEnabled", "Node.HasIssuesEnabled"), Description: "If true, the repository has issues feature enabled."}, + {Name: "has_projects_enabled", Type: proto.ColumnType_BOOL, Hydrate: hydrateForCache, Transform: transform.FromField("HasProjectsEnabled", "Node.HasProjectsEnabled"), Description: "If true, the repository has the Projects feature enabled."}, + {Name: "has_vulnerability_alerts_enabled", Type: proto.ColumnType_BOOL, Hydrate: hydrateForCache, Transform: transform.FromField("HasVulnerabilityAlertsEnabled", "Node.HasVulnerabilityAlertsEnabled"), Description: "If true, vulnerability alerts are enabled for the repository."}, + {Name: "has_wiki_enabled", Type: proto.ColumnType_BOOL, Hydrate: hydrateForCache, Transform: transform.FromField("HasWikiEnabled", "Node.HasWikiEnabled"), Description: "If true, the repository has wiki feature enabled."}, + {Name: "homepage_url", Type: proto.ColumnType_STRING, Hydrate: hydrateForCache, Transform: transform.FromField("HomepageUrl", "Node.HomepageUrl"), Description: "The external URL of the repository if set."}, + {Name: "interaction_ability", Type: proto.ColumnType_JSON, Hydrate: hydrateForCache, Transform: transform.FromField("InteractionAbility", "Node.InteractionAbility").NullIfZero(), Description: "The interaction ability settings for this repository."}, + {Name: "is_archived", Type: proto.ColumnType_BOOL, Hydrate: hydrateForCache, Transform: transform.FromField("IsArchived", "Node.IsArchived"), Description: "If true, the repository is unmaintained (archived)."}, + {Name: "is_blank_issues_enabled", Type: proto.ColumnType_BOOL, Hydrate: hydrateForCache, Transform: transform.FromField("IsBlankIssuesEnabled", "Node.IsBlankIssuesEnabled"), Description: "If true, blank issue creation is allowed."}, + {Name: "is_disabled", Type: proto.ColumnType_BOOL, Hydrate: hydrateForCache, Transform: transform.FromField("IsDisabled", "Node.IsDisabled"), Description: "If true, this repository disabled."}, + {Name: "is_empty", Type: proto.ColumnType_BOOL, Hydrate: hydrateForCache, Transform: transform.FromField("IsEmpty", "Node.IsEmpty"), Description: "If true, this repository is empty."}, + {Name: "is_fork", Type: proto.ColumnType_BOOL, Hydrate: hydrateForCache, Transform: transform.FromField("IsFork", "Node.IsFork"), Description: "If true, the repository is a fork."}, + {Name: "is_in_organization", Type: proto.ColumnType_BOOL, Hydrate: hydrateForCache, Transform: transform.FromField("IsInOrganization", "Node.IsInOrganization"), Description: "If true, repository is either owned by an organization, or is a private fork of an organization repository."}, + {Name: "is_locked", Type: proto.ColumnType_BOOL, Hydrate: hydrateForCache, Transform: transform.FromField("IsLocked", "Node.IsLocked"), Description: "If true, repository is locked."}, + {Name: "is_mirror", Type: proto.ColumnType_BOOL, Hydrate: hydrateForCache, Transform: transform.FromField("IsMirror", "Node.IsMirror"), Description: "If true, the repository is a mirror."}, + {Name: "is_private", Type: proto.ColumnType_BOOL, Hydrate: hydrateForCache, Transform: transform.FromField("IsPrivate", "Node.IsPrivate"), Description: "If true, the repository is private or internal."}, + {Name: "is_security_policy_enabled", Type: proto.ColumnType_BOOL, Hydrate: hydrateForCache, Transform: transform.FromField("IsSecurityPolicyEnabled", "Node.IsSecurityPolicyEnabled"), Description: "If true, repository has a security policy."}, + {Name: "is_template", Type: proto.ColumnType_BOOL, Hydrate: hydrateForCache, Transform: transform.FromField("IsTemplate", "Node.IsTemplate"), Description: "If true, the repository is a template that can be used to generate new repositories."}, + {Name: "is_user_configuration_repository", Type: proto.ColumnType_BOOL, Hydrate: hydrateForCache, Transform: transform.FromField("IsUserConfigurationRepository", "Node.IsUserConfigurationRepository"), Description: "If true, this is a user configuration repository."}, + {Name: "issue_templates", Type: proto.ColumnType_JSON, Hydrate: hydrateForCache, Transform: transform.FromField("IssueTemplates", "Node.IssueTemplates").NullIfZero(), Description: "A list of issue templates associated to the repository."}, + {Name: "license_info", Type: proto.ColumnType_JSON, Hydrate: hydrateForCache, Transform: transform.FromField("LicenseInfo", "Node.LicenseInfo").NullIfZero(), Description: "The license associated with the repository."}, + {Name: "lock_reason", Type: proto.ColumnType_STRING, Hydrate: hydrateForCache, Transform: transform.FromField("LockReason", "Node.LockReason"), Description: "The reason the repository has been locked."}, + {Name: "merge_commit_allowed", Type: proto.ColumnType_BOOL, Hydrate: hydrateForCache, Transform: transform.FromField("MergeCommitAllowed", "Node.MergeCommitAllowed"), Description: "If true, PRs are merged with a merge commit on this repository."}, + {Name: "merge_commit_message", Type: proto.ColumnType_STRING, Hydrate: hydrateForCache, Transform: transform.FromField("MergeCommitMessage", "Node.MergeCommitMessage"), Description: "How the default commit message will be generated when merging a pull request."}, + {Name: "merge_commit_title", Type: proto.ColumnType_STRING, Hydrate: hydrateForCache, Transform: transform.FromField("MergeCommitTitle", "Node.MergeCommitTitle"), Description: "How the default commit title will be generated when merging a pull request."}, + {Name: "mirror_url", Type: proto.ColumnType_STRING, Hydrate: hydrateForCache, Transform: transform.FromField("MirrorUrl", "Node.MirrorUrl"), Description: "The repository's original mirror URL."}, {Name: "name_with_owner", Type: proto.ColumnType_STRING, Transform: transform.FromField("NameWithOwner", "Node.NameWithOwner"), Description: "The repository's name with owner."}, - {Name: "open_graph_image_url", Type: proto.ColumnType_STRING, Transform: transform.FromField("MirrorUrl", "Node.MirrorUrl"), Description: "The image used to represent this repository in Open Graph data."}, + {Name: "open_graph_image_url", Type: proto.ColumnType_STRING, Hydrate: hydrateForCache, Transform: transform.FromField("MirrorUrl", "Node.MirrorUrl"), Description: "The image used to represent this repository in Open Graph data."}, {Name: "owner_login", Type: proto.ColumnType_STRING, Transform: transform.FromField("Owner.Login", "Node.Owner.Login"), Description: "Login of the repository owner."}, - {Name: "primary_language", Type: proto.ColumnType_JSON, Transform: transform.FromField("PrimaryLanguage", "Node.PrimaryLanguage").NullIfZero(), Description: "The primary language of the repository's code."}, - {Name: "projects_url", Type: proto.ColumnType_STRING, Transform: transform.FromField("ProjectsUrl", "Node.ProjectsUrl"), Description: "The URL listing the repository's projects."}, - {Name: "pull_request_templates", Type: proto.ColumnType_JSON, Transform: transform.FromField("PullRequestTemplates", "Node.PullRequestTemplates"), Description: "Returns a list of pull request templates associated to the repository."}, - {Name: "pushed_at", Type: proto.ColumnType_TIMESTAMP, Transform: transform.FromField("PushedAt", "Node.PushedAt").NullIfZero().Transform(convertTimestamp), Description: "Timestamp when the repository was last pushed to."}, - {Name: "rebase_merge_allowed", Type: proto.ColumnType_BOOL, Transform: transform.FromField("RebaseMergeAllowed", "Node.RebaseMergeAllowed"), Description: "If true, rebase-merging is enabled on this repository."}, - {Name: "security_policy_url", Type: proto.ColumnType_STRING, Transform: transform.FromField("SecurityPolicyUrl", "Node.SecurityPolicyUrl"), Description: "The security policy URL."}, - {Name: "squash_merge_allowed", Type: proto.ColumnType_BOOL, Transform: transform.FromField("SquashMergeAllowed", "Node.SquashMergeAllowed"), Description: "If true, squash-merging is enabled on this repository."}, - {Name: "squash_merge_commit_message", Type: proto.ColumnType_STRING, Transform: transform.FromField("SquashMergeCommitMessage", "Node.SquashMergeCommitMessage"), Description: "How the default commit message will be generated when squash merging a pull request."}, - {Name: "squash_merge_commit_title", Type: proto.ColumnType_STRING, Transform: transform.FromField("SquashMergeCommitTitle", "Node.SquashMergeCommitTitle"), Description: "How the default commit title will be generated when squash merging a pull request."}, - {Name: "ssh_url", Type: proto.ColumnType_STRING, Transform: transform.FromField("SshUrl", "Node.SshUrl"), Description: "The SSH URL to clone this repository."}, - {Name: "stargazer_count", Type: proto.ColumnType_INT, Transform: transform.FromField("StargazerCount", "Node.StargazerCount"), Description: "Returns a count of how many stargazers there are on this repository."}, - {Name: "updated_at", Type: proto.ColumnType_TIMESTAMP, Transform: transform.FromField("UpdatedAt", "Node.UpdatedAt").NullIfZero().Transform(convertTimestamp), Description: "Timestamp when repository was last updated."}, - {Name: "url", Type: proto.ColumnType_STRING, Transform: transform.FromField("Url", "Node.Url"), Description: "The URL of the repository."}, - {Name: "uses_custom_open_graph_image", Type: proto.ColumnType_BOOL, Transform: transform.FromField("UsesCustomOpenGraphImage", "Node.UsesCustomOpenGraphImage"), Description: "if true, this repository has a custom image to use with Open Graph as opposed to being represented by the owner's avatar."}, - {Name: "can_administer", Type: proto.ColumnType_BOOL, Transform: transform.FromField("CanAdminister", "Node.CanAdminister"), Description: "If true, you can administer this repository."}, - {Name: "can_create_projects", Type: proto.ColumnType_BOOL, Transform: transform.FromField("CanCreateProjects", "Node.CanCreateProjects"), Description: "If true, you can create projects in this repository."}, - {Name: "can_subscribe", Type: proto.ColumnType_BOOL, Transform: transform.FromField("CanSubscribe", "Node.CanSubscribe"), Description: "If true, you can subscribe to this repository."}, - {Name: "can_update_topics", Type: proto.ColumnType_BOOL, Transform: transform.FromField("CanUpdateTopics", "Node.CanUpdateTopics"), Description: "If true, you can update topics on this repository."}, - {Name: "has_starred", Type: proto.ColumnType_BOOL, Transform: transform.FromField("HasStarred", "Node.HasStarred"), Description: "If true, you have starred this repository."}, - {Name: "possible_commit_emails", Type: proto.ColumnType_JSON, Transform: transform.FromField("PossibleCommitEmails", "Node.PossibleCommitEmails").NullIfZero(), Description: "A list of emails you can commit to this repository with."}, - {Name: "subscription", Type: proto.ColumnType_STRING, Transform: transform.FromField("Subscription", "Node.Subscription"), Description: "Identifies if the current user is watching, not watching, or ignoring the repository."}, - {Name: "visibility", Type: proto.ColumnType_STRING, Transform: transform.FromField("Visibility", "Node.Visibility"), Description: "Indicates the repository's visibility level."}, - {Name: "your_permission", Type: proto.ColumnType_STRING, Transform: transform.FromField("YourPermission", "Node.YourPermission"), Description: "Your permission level on the repository. Will return null if authenticated as an GitHub App."}, - {Name: "web_commit_signoff_required", Type: proto.ColumnType_BOOL, Transform: transform.FromField("WebCommitSignoffRequired", "Node.WebCommitSignoffRequired"), Description: "If true, contributors are required to sign off on web-based commits in this repository."}, - {Name: "repository_topics_total_count", Type: proto.ColumnType_INT, Transform: transform.FromField("RepositoryTopics.TotalCount", "Node.RepositoryTopics.TotalCount"), Description: "Count of topics associated with the repository."}, - {Name: "open_issues_total_count", Type: proto.ColumnType_INT, Transform: transform.FromField("OpenIssues.TotalCount", "Node.OpenIssues.TotalCount"), Description: "Count of issues open on the repository."}, - {Name: "watchers_total_count", Type: proto.ColumnType_INT, Transform: transform.FromField("Watchers.TotalCount", "Node.Watchers.TotalCount"), Description: "Count of watchers on the repository."}, + {Name: "primary_language", Type: proto.ColumnType_JSON, Hydrate: hydrateForCache, Transform: transform.FromField("PrimaryLanguage", "Node.PrimaryLanguage").NullIfZero(), Description: "The primary language of the repository's code."}, + {Name: "projects_url", Type: proto.ColumnType_STRING, Hydrate: hydrateForCache, Transform: transform.FromField("ProjectsUrl", "Node.ProjectsUrl"), Description: "The URL listing the repository's projects."}, + {Name: "pull_request_templates", Type: proto.ColumnType_JSON, Hydrate: hydrateForCache, Transform: transform.FromField("PullRequestTemplates", "Node.PullRequestTemplates"), Description: "Returns a list of pull request templates associated to the repository."}, + {Name: "pushed_at", Type: proto.ColumnType_TIMESTAMP, Hydrate: hydrateForCache, Transform: transform.FromField("PushedAt", "Node.PushedAt").NullIfZero().Transform(convertTimestamp), Description: "Timestamp when the repository was last pushed to."}, + {Name: "rebase_merge_allowed", Type: proto.ColumnType_BOOL, Hydrate: hydrateForCache, Transform: transform.FromField("RebaseMergeAllowed", "Node.RebaseMergeAllowed"), Description: "If true, rebase-merging is enabled on this repository."}, + {Name: "security_policy_url", Type: proto.ColumnType_STRING, Hydrate: hydrateForCache, Transform: transform.FromField("SecurityPolicyUrl", "Node.SecurityPolicyUrl"), Description: "The security policy URL."}, + {Name: "squash_merge_allowed", Type: proto.ColumnType_BOOL, Hydrate: hydrateForCache, Transform: transform.FromField("SquashMergeAllowed", "Node.SquashMergeAllowed"), Description: "If true, squash-merging is enabled on this repository."}, + {Name: "squash_merge_commit_message", Type: proto.ColumnType_STRING, Hydrate: hydrateForCache, Transform: transform.FromField("SquashMergeCommitMessage", "Node.SquashMergeCommitMessage"), Description: "How the default commit message will be generated when squash merging a pull request."}, + {Name: "squash_merge_commit_title", Type: proto.ColumnType_STRING, Hydrate: hydrateForCache, Transform: transform.FromField("SquashMergeCommitTitle", "Node.SquashMergeCommitTitle"), Description: "How the default commit title will be generated when squash merging a pull request."}, + {Name: "ssh_url", Type: proto.ColumnType_STRING, Hydrate: hydrateForCache, Transform: transform.FromField("SshUrl", "Node.SshUrl"), Description: "The SSH URL to clone this repository."}, + {Name: "stargazer_count", Type: proto.ColumnType_INT, Hydrate: hydrateForCache, Transform: transform.FromField("StargazerCount", "Node.StargazerCount"), Description: "Returns a count of how many stargazers there are on this repository."}, + {Name: "updated_at", Type: proto.ColumnType_TIMESTAMP, Hydrate: hydrateForCache, Transform: transform.FromField("UpdatedAt", "Node.UpdatedAt").NullIfZero().Transform(convertTimestamp), Description: "Timestamp when repository was last updated."}, + {Name: "url", Type: proto.ColumnType_STRING, Hydrate: hydrateForCache, Transform: transform.FromField("Url", "Node.Url"), Description: "The URL of the repository."}, + {Name: "uses_custom_open_graph_image", Type: proto.ColumnType_BOOL, Hydrate: hydrateForCache, Transform: transform.FromField("UsesCustomOpenGraphImage", "Node.UsesCustomOpenGraphImage"), Description: "if true, this repository has a custom image to use with Open Graph as opposed to being represented by the owner's avatar."}, + {Name: "can_administer", Type: proto.ColumnType_BOOL, Hydrate: hydrateForCache, Transform: transform.FromField("CanAdminister", "Node.CanAdminister"), Description: "If true, you can administer this repository."}, + {Name: "can_create_projects", Type: proto.ColumnType_BOOL, Hydrate: hydrateForCache, Transform: transform.FromField("CanCreateProjects", "Node.CanCreateProjects"), Description: "If true, you can create projects in this repository."}, + {Name: "can_subscribe", Type: proto.ColumnType_BOOL, Hydrate: hydrateForCache, Transform: transform.FromField("CanSubscribe", "Node.CanSubscribe"), Description: "If true, you can subscribe to this repository."}, + {Name: "can_update_topics", Type: proto.ColumnType_BOOL, Hydrate: hydrateForCache, Transform: transform.FromField("CanUpdateTopics", "Node.CanUpdateTopics"), Description: "If true, you can update topics on this repository."}, + {Name: "has_starred", Type: proto.ColumnType_BOOL, Hydrate: hydrateForCache, Transform: transform.FromField("HasStarred", "Node.HasStarred"), Description: "If true, you have starred this repository."}, + {Name: "possible_commit_emails", Type: proto.ColumnType_JSON, Hydrate: hydrateForCache, Transform: transform.FromField("PossibleCommitEmails", "Node.PossibleCommitEmails").NullIfZero(), Description: "A list of emails you can commit to this repository with."}, + {Name: "subscription", Type: proto.ColumnType_STRING, Hydrate: hydrateForCache, Transform: transform.FromField("Subscription", "Node.Subscription"), Description: "Identifies if the current user is watching, not watching, or ignoring the repository."}, + {Name: "visibility", Type: proto.ColumnType_STRING, Hydrate: hydrateForCache, Transform: transform.FromField("Visibility", "Node.Visibility"), Description: "Indicates the repository's visibility level."}, + {Name: "your_permission", Type: proto.ColumnType_STRING, Hydrate: hydrateForCache, Transform: transform.FromField("YourPermission", "Node.YourPermission"), Description: "Your permission level on the repository. Will return null if authenticated as an GitHub App."}, + {Name: "web_commit_signoff_required", Type: proto.ColumnType_BOOL, Hydrate: hydrateForCache, Transform: transform.FromField("WebCommitSignoffRequired", "Node.WebCommitSignoffRequired"), Description: "If true, contributors are required to sign off on web-based commits in this repository."}, + {Name: "repository_topics_total_count", Type: proto.ColumnType_INT, Hydrate: hydrateForCache, Transform: transform.FromField("RepositoryTopics.TotalCount", "Node.RepositoryTopics.TotalCount"), Description: "Count of topics associated with the repository."}, + {Name: "open_issues_total_count", Type: proto.ColumnType_INT, Hydrate: hydrateForCache, Transform: transform.FromField("OpenIssues.TotalCount", "Node.OpenIssues.TotalCount"), Description: "Count of issues open on the repository."}, + {Name: "watchers_total_count", Type: proto.ColumnType_INT, Hydrate: hydrateForCache, Transform: transform.FromField("Watchers.TotalCount", "Node.Watchers.TotalCount"), Description: "Count of watchers on the repository."}, // Columns from v3 api - hydrates {Name: "hooks", Type: proto.ColumnType_JSON, Description: "The API Hooks URL.", Hydrate: hydrateRepositoryHooksFromV3, Transform: transform.FromValue()}, {Name: "topics", Type: proto.ColumnType_JSON, Description: "The topics (similar to tags or labels) associated with the repository.", Hydrate: hydrateRepositoryDataFromV3}, @@ -131,6 +133,7 @@ func tableGitHubRepositoryList(ctx context.Context, d *plugin.QueryData, h *plug "owner": githubv4.String(owner), "name": githubv4.String(repoName), } + appendRepoColumnIncludes(&variables, d.QueryContext.Columns) err := client.Query(ctx, &query, variables) plugin.Logger(ctx).Debug(rateLimitLogString("github_repository", &query.RateLimit)) @@ -204,3 +207,89 @@ func extractRepoFromHydrateItem(h *plugin.HydrateData) (models.Repository, error return models.Repository{}, fmt.Errorf("unable to parse hydrate item %v as a Repository", h.Item) } } + +func appendRepoColumnIncludes(m *map[string]interface{}, cols []string) { + optionals := map[string]string{ + "allow_update_branch": "includeAllowUpdateBranch", + "archived_at": "includeArchivedAt", + "auto_merge_allowed": "includeAutoMergeAllowed", + "can_administer": "includeCanAdminister", + "can_create_projects": "includeCanCreateProjects", + "can_subscribe": "includeCanSubscribe", + "can_update_topics": "includeCanUpdateTopics", + "code_of_conduct": "includeCodeOfConduct", + "contact_links": "includeContactLinks", + "created_at": "includeCreatedAt", + "default_branch_ref": "includeDefaultBranchRef", + "delete_branch_on_merge": "includeDeleteBranchOnMerge", + "description": "includeDescription", + "disk_usage": "includeDiskUsage", + "fork_count": "includeForkCount", + "forking_allowed": "includeForkingAllowed", + "funding_links": "includeFundingLinks", + "has_discussions_enabled": "includeHasDiscussionsEnabled", + "has_issues_enabled": "includeHasIssuesEnabled", + "has_projects_enabled": "includeHasProjectsEnabled", + "has_starred": "includeHasStarred", + "has_vulnerability_alerts_enabled": "includeHasVulnerabilityAlertsEnabled", + "has_wiki_enabled": "includeHasWikiEnabled", + "homepage_url": "includeHomepageUrl", + "interaction_ability": "includeInteractionAbility", + "is_archived": "includeIsArchived", + "is_blank_issues_enabled": "includeIsBlankIssuesEnabled", + "is_disabled": "includeIsDisabled", + "is_empty": "includeIsEmpty", + "is_fork": "includeIsFork", + "is_in_organization": "includeIsInOrganization", + "is_locked": "includeIsLocked", + "is_mirror": "includeIsMirror", + "is_private": "includeIsPrivate", + "is_security_policy_enabled": "includeIsSecurityPolicyEnabled", + "is_template": "includeIsTemplate", + "is_user_configuration_repository": "includeIsUserConfigurationRepository", + "issue_templates": "includeIssueTemplates", + "license_info": "includeLicenseInfo", + "lock_reason": "includeLockReason", + "merge_commit_allowed": "includeMergeCommitAllowed", + "merge_commit_message": "includeMergeCommitMessage", + "merge_commit_title": "includeMergeCommitTitle", + "mirror_url": "includeMirrorUrl", + "open_graph_image_url": "includeOpenGraphImageUrl", + "open_issues_total_count": "includeOpenIssues", + "possible_commit_emails": "includePossibleCommitEmails", + "primary_language": "includePrimaryLanguage", + "projects_url": "includeProjectsUrl", + "pull_request_templates": "includePullRequestTemplates", + "pushed_at": "includePushedAt", + "rebase_merge_allowed": "includeRebaseMergeAllowed", + "repository_topics_total_count": "includeRepositoryTopics", + "security_policy_url": "includeSecurityPolicyUrl", + "squash_merge_allowed": "includeSquashMergeAllowed", + "squash_merge_commit_message": "includeSquashMergeCommitMessage", + "squash_merge_commit_title": "includeSquashMergeCommitTitle", + "ssh_url": "includeSshUrl", + "stargazer_count": "includeStargazerCount", + "subscription": "includeSubscription", + "updated_at": "includeUpdatedAt", + "url": "includeUrl", + "uses_custom_open_graph_image": "includeUsesCustomOpenGraphImage", + "visibility": "includeVisibility", + "watchers_total_count": "includeWatchers", + "web_commit_signoff_required": "includeWebCommitSignoffRequired", + "your_permission": "includeYourPermission", + } + + for key, value := range optionals { + (*m)[value] = githubv4.Boolean(slices.Contains(cols, key)) + } +} + +// As of Steampipe SDK v5.5.1, when calling a List hydrate, the SDK expects all +// column values to be returned so it will cache all column values. For any +// columns whose values aren't returned, the zero value for that column type +// will be cached, e.g., null for JSON, 0 for int. As a workaround, we add a +// hydrate function to any columns that can be excluded from a query in order +// to trick the SDK into only caching them when they're specifically requested. +func hydrateForCache(_ context.Context, _ *plugin.QueryData, h *plugin.HydrateData) (interface{}, error) { + return h.Item, nil +} diff --git a/github/table_github_search_repository.go b/github/table_github_search_repository.go index 2c2301de..0127ae39 100644 --- a/github/table_github_search_repository.go +++ b/github/table_github_search_repository.go @@ -47,6 +47,7 @@ func tableGitHubSearchRepositoryList(ctx context.Context, d *plugin.QueryData, h "cursor": (*githubv4.String)(nil), "query": githubv4.String(input), } + appendRepoColumnIncludes(&variables, d.QueryContext.Columns) client := connectV4(ctx, d) for { diff --git a/go.mod b/go.mod index 8fc32486..79be7897 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/turbot/steampipe-plugin-github -go 1.19 +go 1.21 require ( github.com/argonsecurity/pipeline-parser v0.3.3 diff --git a/go.sum b/go.sum index 39da9f15..0f1d286b 100644 --- a/go.sum +++ b/go.sum @@ -209,6 +209,7 @@ github.com/allegro/bigcache/v3 v3.1.0 h1:H2Vp8VOvxcrB91o86fUSVJFqeuz8kpyyB02eH3b github.com/allegro/bigcache/v3 v3.1.0/go.mod h1:aPyh7jEvrog9zAwx5N7+JUQX5dZTSGpxF1LAR4dr35I= github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3 h1:ZSTrOEhiM5J5RFxEaFvMZVEAM1KvT1YzbEOwB2EAGjA= +github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM= github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= github.com/argonsecurity/pipeline-parser v0.3.3 h1:dkEt+b+zaI93O+Ag08kAWRNUrLu12NUYSV+d0rYWzkc= @@ -253,6 +254,7 @@ github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/coocood/freecache v1.2.3 h1:lcBwpZrwBZRZyLk/8EMyQVXRiFl663cCuMOrjCALeto= +github.com/coocood/freecache v1.2.3/go.mod h1:RBUWa/Cy+OHdfTGFEhEuE1pMCMX51Ncizj7rthiQ3vk= github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964 h1:y5HC9v93H5EPKqaS1UYVg1uYah5Xf51mBfIoWehClUQ= github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964/go.mod h1:Xd9hchkHSWYkEqJwUGisez3G1QY8Ryz0sdWrLPMGjLk= github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -289,6 +291,7 @@ github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYF github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= +github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= @@ -322,6 +325,7 @@ github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= +github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ= github.com/gogo/protobuf v1.2.2-0.20190723190241-65acae22fc9d/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= @@ -395,6 +399,7 @@ github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIG github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= +github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= @@ -435,6 +440,7 @@ github.com/googleapis/gax-go/v2 v2.11.0/go.mod h1:DxmR61SGKkGLa2xigwuZIQpkCI2S5i github.com/googleapis/gnostic v0.0.0-20170729233727-0c5108395e2d/go.mod h1:sJBsCZ4ayReDTBIg8b9dl28c5xFWyhBTVRp3pOg5EKY= github.com/googleapis/go-type-adapters v1.0.0/go.mod h1:zHW75FOG2aur7gAO2B+MLby+cLsWGBF62rFAi7WjWO4= github.com/gopherjs/gopherjs v1.17.2 h1:fQnZVsXk8uxXIStYb0N4bGk7jeyTalG/wsZjQ25dO0g= +github.com/gopherjs/gopherjs v1.17.2/go.mod h1:pRRIvn/QzFLrKfvEz3qUuEhtE/zLCWfreZ6J5gM2i+k= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0 h1:BZHcxBETFHIdVyhyEfOvn/RdU/QGdLI4y34qQGjGWO0= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= @@ -462,6 +468,7 @@ github.com/iancoleman/strcase v0.2.0/go.mod h1:iwCmte+B7n89clKwxIoIXy/HfoL7AsD47 github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/jhump/protoreflect v1.6.0 h1:h5jfMVslIg6l29nsMs0D8Wj17RDVdNYti0vDN/PZZoE= +github.com/jhump/protoreflect v1.6.0/go.mod h1:eaTn3RZAmMBcV0fifFvlm6VHNz3wSkYyXYWUh7ymB74= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= @@ -476,6 +483,7 @@ github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHm github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= +github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= @@ -487,10 +495,13 @@ github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxv github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pretty v0.3.0 h1:WgNl7dwNpEZ6jJ9k1snq4pZsg7DOEN8hP9Xw0Tsjwk0= +github.com/kr/pretty v0.3.0/go.mod h1:640gp4NfQd8pI5XOwp5fnNeVWj67G7CFk/SaSQn7NBk= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= +github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348 h1:MtvEpTB6LX3vkb4ax0b5D2DHbNAUsen0Gx5wZoq3lV4= +github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= github.com/mailru/easyjson v0.0.0-20160728113105-d5b7844b561a/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= @@ -526,6 +537,7 @@ github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRW github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= +github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= @@ -534,10 +546,13 @@ github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.10.1/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= +github.com/onsi/ginkgo v1.16.5/go.mod h1:+E8gABHa3K6zRBolWtd+ROzc/U5bkGt0FwiG042wbpU= github.com/onsi/gomega v0.0.0-20170829124025-dcabb60a477c/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.7.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.20.1 h1:PA/3qinGoukvymdIDV8pii6tiZgC8kbmJO6Z5+b002Q= +github.com/onsi/gomega v1.20.1/go.mod h1:DtrZpjmvpn2mPm4YWQa0/ALMDj9v4YxLgojwPeREyVo= github.com/patrickmn/go-cache v2.1.0+incompatible h1:HRMgzkcYKYpi3C8ajMPV8OFXaaRUnok+kx1WdO15EQc= +github.com/patrickmn/go-cache v2.1.0+incompatible/go.mod h1:3Qf8kWWT7OJRJbdiICTKqZju1ZixQ/KpMGzzAfe6+WQ= github.com/pegasus-kv/thrift v0.13.0 h1:4ESwaNoHImfbHa9RUGJiJZ4hrxorihZHk5aarYwY8d4= github.com/pegasus-kv/thrift v0.13.0/go.mod h1:Gl9NT/WHG6ABm6NsrbfE8LiJN0sAyneCrvB4qN4NPqQ= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -574,12 +589,15 @@ github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1 github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo= github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4= github.com/r3labs/diff/v3 v3.0.0 h1:ZhPwNxn9gW5WLPBV9GCYaVbMdLOSmJ0DeKdCiSbOLUI= +github.com/r3labs/diff/v3 v3.0.0/go.mod h1:wCkTySAiDnZao1sZrVTDIzuzgLZ+cNPGn3LC8DlIg5g= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k= +github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= +github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sethvargo/go-retry v0.2.4 h1:T+jHEQy/zKJf5s95UkguisicE0zuF9y7+/vgz08Ocec= github.com/sethvargo/go-retry v0.2.4/go.mod h1:1afjQuvh7s4gflMObvjLPaWgluLLyhA1wmVZ6KLpICw= github.com/shurcooL/githubv4 v0.0.0-20221021030919-a134b1472cc7 h1:g0m1EUfoJCgI9ezonUedPJiloNaB6B0yJFgkoxOkT28= @@ -592,7 +610,9 @@ github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrf github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v1.13.0 h1:Dx1kYM01xsSqKPno3aqLnrwac2LetPvN23diwyr69Qs= +github.com/smartystreets/assertions v1.13.0/go.mod h1:wDmR7qL282YbGsPy6H/yAsesrxfxaaSlJazyFLYVFx8= github.com/smartystreets/goconvey v1.7.2 h1:9RBaZCeXEQ3UselpuwUQHltGVXvdwm6cv1hgR6gDIPg= +github.com/smartystreets/goconvey v1.7.2/go.mod h1:Vw0tHAZW6lzCRk3xgdin6fKYcG+G3Pg9vgXWeJpQFMM= github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA= github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= @@ -616,6 +636,7 @@ github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1F github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gtY= +github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= github.com/tkrajina/go-reflector v0.5.6 h1:hKQ0gyocG7vgMD2M3dRlYN6WBBOmdoOzJ6njQSepKdE= github.com/tkrajina/go-reflector v0.5.6/go.mod h1:ECbqLgccecY5kPmPmXg1MrHW585yMcDkVl6IvJe64T4= github.com/turbot/go-kit v0.7.0 h1:Jiua34hnICSWzJgYmqup/sY7G/1jlMqcElJgDIM8uFU= @@ -625,6 +646,7 @@ github.com/turbot/steampipe-plugin-sdk/v5 v5.5.1/go.mod h1:bB45PpBccG2tU1lCAc4Y/ github.com/ulikunitz/xz v0.5.10 h1:t92gobL9l3HE202wg3rlk19F6X+JOxl9BBrCCMYEYd8= github.com/ulikunitz/xz v0.5.10/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI= +github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -666,6 +688,7 @@ go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqe go.opentelemetry.io/proto/otlp v0.19.0 h1:IVN6GR+mhC4s5yfcTbmzHYODqvWAp3ZedA2SJPI1Nnw= go.opentelemetry.io/proto/otlp v0.19.0/go.mod h1:H7XAot3MsfNsj7EXtrA2q5xSNQ10UqI405h3+duxN4U= go.uber.org/goleak v1.2.1 h1:NBol2c7O1ZokfZ0LEU9K6Whx/KnwvepVetCUhtKja4A= +go.uber.org/goleak v1.2.1/go.mod h1:qlT2yGI9QafXHhZZLxlSuNsMw3FFLxBr+tBRlmO1xH4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -1207,6 +1230,7 @@ gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= +gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=