Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion github/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strings"
"time"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v89/github"
"github.com/turbot/steampipe-plugin-sdk/v6/plugin"
)

Expand Down
18 changes: 9 additions & 9 deletions github/models/team.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ import (

type Team struct {
basicIdentifiers
AvatarUrl string `graphql:"avatarUrl @include(if:$includeTeamAvatarUrl)" json:"avatar_url"`
CombinedSlug string `graphql:"combinedSlug @include(if:$includeTeamCombinedSlug)" json:"combined_slug"`
CreatedAt time.Time `graphql:"createdAt @include(if:$includeTeamCreatedAt)" json:"created_at"`
Description string `graphql:"description @include(if:$includeTeamDescription)" json:"description"`
EditTeamUrl string `graphql:"editTeamUrl @include(if:$includeTeamEditTeamUrl)" json:"edit_team_url"`
MembersUrl string `graphql:"membersUrl @include(if:$includeTeamMembersUrl)" json:"members_url"`
NewTeamUrl string `graphql:"newTeamUrl @include(if:$includeTeamNewTeamUrl)" json:"new_team_url"`
Organization BasicOrganization `json:"organization"`
ParentTeam struct {
AvatarUrl string `graphql:"avatarUrl @include(if:$includeTeamAvatarUrl)" json:"avatar_url"`
CombinedSlug string `graphql:"combinedSlug @include(if:$includeTeamCombinedSlug)" json:"combined_slug"`
CreatedAt time.Time `graphql:"createdAt @include(if:$includeTeamCreatedAt)" json:"created_at"`
Description string `graphql:"description @include(if:$includeTeamDescription)" json:"description"`
EditTeamUrl string `graphql:"editTeamUrl @include(if:$includeTeamEditTeamUrl)" json:"edit_team_url"`
MembersUrl string `graphql:"membersUrl @include(if:$includeTeamMembersUrl)" json:"members_url"`
NewTeamUrl string `graphql:"newTeamUrl @include(if:$includeTeamNewTeamUrl)" json:"new_team_url"`
Organization BasicOrganization `json:"organization"`
ParentTeam struct {
basicIdentifiers
Slug string `json:"slug,omitempty"`
} `graphql:"parentTeam @include(if:$includeTeamParentTeam)" json:"parent_team"`
Expand Down
2 changes: 1 addition & 1 deletion github/stargazer_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,4 @@ func strHydrateUser(_ context.Context, _ *plugin.QueryData, h *plugin.HydrateDat
return nil, err
}
return str.Node, nil
}
}
6 changes: 4 additions & 2 deletions github/table_github_actions_artifact.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package github
import (
"context"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v89/github"

"github.com/turbot/steampipe-plugin-sdk/v6/grpc/proto"
"github.com/turbot/steampipe-plugin-sdk/v6/plugin"
Expand Down Expand Up @@ -46,7 +46,9 @@ func tableGitHubArtifactList(ctx context.Context, d *plugin.QueryData, h *plugin

fullName := d.EqualsQuals["repository_full_name"].GetStringValue()
owner, repo := parseRepoFullName(fullName)
opts := &github.ListOptions{PerPage: 100}
opts := &github.ListArtifactsOptions{
ListOptions: github.ListOptions{PerPage: 100},
}

limit := d.QueryContext.Limit
if limit != nil {
Expand Down
6 changes: 3 additions & 3 deletions github/table_github_actions_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package github
import (
"context"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v89/github"

"github.com/turbot/steampipe-plugin-sdk/v6/grpc/proto"
"github.com/turbot/steampipe-plugin-sdk/v6/plugin"
Expand Down Expand Up @@ -48,10 +48,10 @@ func tableGitHubCacheList(ctx context.Context, d *plugin.QueryData, h *plugin.Hy
ListOptions: github.ListOptions{PerPage: 100},
}
if key := d.EqualsQualString("key"); key != "" {
opts.Key = github.String(key)
opts.Key = &key
}
if ref := d.EqualsQualString("ref"); ref != "" {
opts.Ref = github.String(ref)
opts.Ref = &ref
}

limit := d.QueryContext.Limit
Expand Down
24 changes: 3 additions & 21 deletions github/table_github_actions_environment_variable.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package github
import (
"context"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v89/github"

"github.com/turbot/steampipe-plugin-sdk/v6/grpc/proto"
"github.com/turbot/steampipe-plugin-sdk/v6/plugin"
Expand Down Expand Up @@ -43,15 +43,6 @@ func tableGitHubEnvVariableList(ctx context.Context, d *plugin.QueryData, h *plu

owner, repo := parseRepoFullName(repoFullName)

// Get repository to obtain its ID
repository, _, err := client.Repositories.Get(ctx, owner, repo)
if err != nil {
return nil, err
}
if repository == nil || repository.ID == nil {
return nil, nil
}

opts := &github.ListOptions{PerPage: 100}

limit := d.QueryContext.Limit
Expand All @@ -62,7 +53,7 @@ func tableGitHubEnvVariableList(ctx context.Context, d *plugin.QueryData, h *plu
}

for {
variables, resp, err := client.Actions.ListEnvVariables(ctx, int(*repository.ID), environmentName, opts)
variables, resp, err := client.Actions.ListEnvVariables(ctx, owner, repo, environmentName, opts)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -103,22 +94,13 @@ func tableGitHubEnvVariableGet(ctx context.Context, d *plugin.QueryData, h *plug

client := connect(ctx, d)

// Get repository to obtain its ID
repository, _, err := client.Repositories.Get(ctx, owner, repo)
if err != nil {
return nil, err
}
if repository == nil || repository.ID == nil {
return nil, nil
}

type GetResponse struct {
variable *github.ActionsVariable
resp *github.Response
}

getDetails := func(ctx context.Context, d *plugin.QueryData, h *plugin.HydrateData) (interface{}, error) {
detail, resp, err := client.Actions.GetEnvVariable(ctx, int(*repository.ID), environmentName, name)
detail, resp, err := client.Actions.GetEnvVariable(ctx, owner, repo, environmentName, name)
return GetResponse{
variable: detail,
resp: resp,
Expand Down
2 changes: 1 addition & 1 deletion github/table_github_actions_organization_variable.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package github
import (
"context"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v89/github"

"github.com/turbot/steampipe-plugin-sdk/v6/grpc/proto"
"github.com/turbot/steampipe-plugin-sdk/v6/plugin"
Expand Down
6 changes: 4 additions & 2 deletions github/table_github_actions_repository_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package github
import (
"context"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v89/github"

"github.com/turbot/steampipe-plugin-sdk/v6/grpc/proto"
"github.com/turbot/steampipe-plugin-sdk/v6/plugin"
Expand Down Expand Up @@ -42,7 +42,9 @@ func tableGitHubRunnerList(ctx context.Context, d *plugin.QueryData, h *plugin.H

orgName := d.EqualsQuals["repository_full_name"].GetStringValue()
owner, repo := parseRepoFullName(orgName)
opts := &github.ListOptions{PerPage: 100}
opts := &github.ListRunnersOptions{
ListOptions: github.ListOptions{PerPage: 100},
}

limit := d.QueryContext.Limit
if limit != nil {
Expand Down
2 changes: 1 addition & 1 deletion github/table_github_actions_repository_secret.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package github
import (
"context"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v89/github"

"github.com/turbot/steampipe-plugin-sdk/v6/grpc/proto"
"github.com/turbot/steampipe-plugin-sdk/v6/plugin"
Expand Down
2 changes: 1 addition & 1 deletion github/table_github_actions_repository_variable.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package github
import (
"context"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v89/github"

"github.com/turbot/steampipe-plugin-sdk/v6/grpc/proto"
"github.com/turbot/steampipe-plugin-sdk/v6/plugin"
Expand Down
2 changes: 1 addition & 1 deletion github/table_github_actions_repository_workflow_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package github
import (
"context"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v89/github"

"github.com/turbot/steampipe-plugin-sdk/v6/grpc/proto"
"github.com/turbot/steampipe-plugin-sdk/v6/plugin"
Expand Down
2 changes: 1 addition & 1 deletion github/table_github_actions_repository_workflow_run.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"time"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v89/github"

"github.com/turbot/steampipe-plugin-sdk/v6/grpc/proto"
"github.com/turbot/steampipe-plugin-sdk/v6/plugin"
Expand Down
2 changes: 1 addition & 1 deletion github/table_github_audit_log.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"time"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v89/github"
"github.com/turbot/steampipe-plugin-sdk/v6/grpc/proto"
"github.com/turbot/steampipe-plugin-sdk/v6/plugin"
"github.com/turbot/steampipe-plugin-sdk/v6/plugin/transform"
Expand Down
2 changes: 1 addition & 1 deletion github/table_github_code_owner.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"strings"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v89/github"
"github.com/turbot/steampipe-plugin-sdk/v6/plugin/transform"

"github.com/turbot/steampipe-plugin-sdk/v6/grpc/proto"
Expand Down
2 changes: 1 addition & 1 deletion github/table_github_gist.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package github
import (
"context"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v89/github"

"github.com/turbot/steampipe-plugin-sdk/v6/grpc/proto"
"github.com/turbot/steampipe-plugin-sdk/v6/plugin"
Expand Down
4 changes: 2 additions & 2 deletions github/table_github_gitignore.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package github
import (
"context"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v89/github"

"github.com/turbot/steampipe-plugin-sdk/v6/grpc/proto"
"github.com/turbot/steampipe-plugin-sdk/v6/plugin"
Expand Down Expand Up @@ -39,7 +39,7 @@ func tableGitHubGitignoreList(ctx context.Context, d *plugin.QueryData, h *plugi

for _, i := range gitIgnores {
if i != "" {
d.StreamListItem(ctx, github.Gitignore{Name: github.String(i)})
d.StreamListItem(ctx, github.Gitignore{Name: &i})
}

// Context can be cancelled due to manual cancellation or the limit has been hit
Expand Down
2 changes: 1 addition & 1 deletion github/table_github_my_gist.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package github
import (
"context"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v89/github"
"github.com/turbot/steampipe-plugin-sdk/v6/plugin"
)

Expand Down
2 changes: 1 addition & 1 deletion github/table_github_organization.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"strings"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v89/github"
"github.com/shurcooL/githubv4"
"github.com/turbot/steampipe-plugin-github/github/models"

Expand Down
2 changes: 1 addition & 1 deletion github/table_github_organization_collaborators.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func listGitHubOrganizationCollaborators(ctx context.Context, d *plugin.QueryDat
}

// We are encountering the secondary rate limit when making API calls with a page size of 100 for large-scale datasets.
// Reducing the page size to fetch smaller data amounts per page could be beneficial.
// Reducing the page size to fetch smaller data amounts per page could be beneficial.
pageSize := adjustPageSize(50, d.QueryContext.Limit)

var query struct {
Expand Down
2 changes: 1 addition & 1 deletion github/table_github_organization_dependabot_alert.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package github
import (
"context"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v89/github"
"github.com/turbot/steampipe-plugin-sdk/v6/grpc/proto"
"github.com/turbot/steampipe-plugin-sdk/v6/plugin"
"github.com/turbot/steampipe-plugin-sdk/v6/plugin/transform"
Expand Down
2 changes: 1 addition & 1 deletion github/table_github_package.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"net/url"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v89/github"

"github.com/turbot/steampipe-plugin-sdk/v6/grpc/proto"
"github.com/turbot/steampipe-plugin-sdk/v6/plugin"
Expand Down
2 changes: 1 addition & 1 deletion github/table_github_package_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"net/url"
"strings"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v89/github"

"github.com/turbot/steampipe-plugin-sdk/v6/grpc/proto"
"github.com/turbot/steampipe-plugin-sdk/v6/plugin"
Expand Down
2 changes: 1 addition & 1 deletion github/table_github_rate_limit.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func tableGitHubRateLimit() *plugin.Table {
func listGitHubRateLimit(ctx context.Context, d *plugin.QueryData, h *plugin.HydrateData) (interface{}, error) {
client := connect(ctx, d)

rateLimits, _, err := client.RateLimits(ctx)
rateLimits, _, err := client.RateLimit.Get(ctx)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion github/table_github_release.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package github
import (
"context"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v89/github"

"github.com/turbot/steampipe-plugin-sdk/v6/grpc/proto"
"github.com/turbot/steampipe-plugin-sdk/v6/plugin"
Expand Down
2 changes: 1 addition & 1 deletion github/table_github_repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"strings"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v89/github"
"github.com/shurcooL/githubv4"
"github.com/turbot/steampipe-plugin-github/github/models"
"github.com/turbot/steampipe-plugin-sdk/v6/grpc/proto"
Expand Down
2 changes: 1 addition & 1 deletion github/table_github_repository_dependabot_alert.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package github
import (
"context"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v89/github"
"github.com/turbot/steampipe-plugin-sdk/v6/grpc/proto"
"github.com/turbot/steampipe-plugin-sdk/v6/plugin"
"github.com/turbot/steampipe-plugin-sdk/v6/plugin/transform"
Expand Down
4 changes: 2 additions & 2 deletions github/table_github_repository_sbom.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -95,4 +95,4 @@ func listRepositorySboms(ctx context.Context, d *plugin.QueryData, h *plugin.Hyd
d.StreamListItem(ctx, sbom.SBOM)

return sbom, nil
}
}
2 changes: 1 addition & 1 deletion github/table_github_search_code.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import (
"context"
"regexp"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v89/github"
"github.com/turbot/steampipe-plugin-sdk/v6/grpc/proto"
"github.com/turbot/steampipe-plugin-sdk/v6/plugin"
"github.com/turbot/steampipe-plugin-sdk/v6/plugin/transform"
Expand Down
2 changes: 1 addition & 1 deletion github/table_github_search_commit.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"regexp"
"strings"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v89/github"
"github.com/turbot/steampipe-plugin-sdk/v6/grpc/proto"
"github.com/turbot/steampipe-plugin-sdk/v6/plugin"
"github.com/turbot/steampipe-plugin-sdk/v6/plugin/transform"
Expand Down
2 changes: 1 addition & 1 deletion github/table_github_search_label.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"regexp"
"strings"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v89/github"
"github.com/turbot/steampipe-plugin-sdk/v6/grpc/proto"
"github.com/turbot/steampipe-plugin-sdk/v6/plugin"
"github.com/turbot/steampipe-plugin-sdk/v6/plugin/transform"
Expand Down
2 changes: 1 addition & 1 deletion github/table_github_search_topic.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package github
import (
"context"

"github.com/google/go-github/v55/github"
"github.com/google/go-github/v89/github"
"github.com/turbot/steampipe-plugin-sdk/v6/grpc/proto"
"github.com/turbot/steampipe-plugin-sdk/v6/plugin"
"github.com/turbot/steampipe-plugin-sdk/v6/plugin/transform"
Expand Down
Loading