github

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 5, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloneHeader

func CloneHeader(in http.Header) http.Header

func CloneRequest

func CloneRequest(req http.Request) http.Request

func NewClientWithAcceptHeader

func NewClientWithAcceptHeader(base http.RoundTripper, acceptHeader *string) *http.Client

func PaginateResults

func PaginateResults(api func(opts *github.ListOptions) (*github.Response, error)) error

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(ctx context.Context, token string, githubEndpoint string, org []string, fillCache bool) (*Client, error)

func (*Client) Client

func (c *Client) Client() *gh.Client

func (*Client) CollectOrganizations

func (c *Client) CollectOrganizations() ([]githubcollected.ExtendedOrg, error)

func (*Client) GetActionsTokenPermissions added in v0.1.7

func (c *Client) GetActionsTokenPermissions(url string) (*types.TokenPermissions, error)

func (*Client) GetActionsTokenPermissionsForOrganization added in v0.1.6

func (c *Client) GetActionsTokenPermissionsForOrganization(organization string) (*types.TokenPermissions, error)

func (*Client) GetActionsTokenPermissionsForRepository added in v0.1.6

func (c *Client) GetActionsTokenPermissionsForRepository(organization string, repository string) (*types.TokenPermissions, error)

func (*Client) GraphQLClient

func (c *Client) GraphQLClient() *githubv4.Client

func (*Client) IsAnalyzable added in v0.1.7

func (c *Client) IsAnalyzable(repository commontypes.RepositoryWithOwner) (bool, error)

func (*Client) IsGithubCloud added in v0.1.6

func (c *Client) IsGithubCloud() bool

func (*Client) Organization added in v0.1.7

func (c *Client) Organization(login string) (*githubcollected.ExtendedOrg, error)

func (*Client) Organizations added in v0.1.7

func (c *Client) Organizations() ([]commontypes.Organization, error)

func (*Client) Orgs

func (c *Client) Orgs() []string

func (*Client) Repositories added in v0.1.7

func (c *Client) Repositories() ([]commontypes.RepositoryWithOwner, error)

func (*Client) Scopes

func (c *Client) Scopes() permissions.TokenScopes

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL