github

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const GitHub string = "github"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(ctx context.Context, token string) (*Client, error)

func (*Client) GetOrgActionsPermissions

func (c *Client) GetOrgActionsPermissions(ctx context.Context, org string) (*github.ActionsPermissions, error)

func (*Client) GetOrgRepos

func (c *Client) GetOrgRepos(ctx context.Context, org string) <-chan analyze.RepoBatch

func (*Client) GetOrgWorkflowsPermissions

func (c *Client) GetOrgWorkflowsPermissions(ctx context.Context, org string) (*github.DefaultWorkflowPermissionOrganization, error)

func (*Client) GetRepoActionsPermissions

func (c *Client) GetRepoActionsPermissions(ctx context.Context, org string, repo string) (*github.ActionsPermissionsRepository, error)

func (*Client) GetRepoWorkflowsPermissions

func (c *Client) GetRepoWorkflowsPermissions(ctx context.Context, org string, repo string) (*github.DefaultWorkflowPermissionRepository, error)

func (*Client) GetRepository

func (c *Client) GetRepository(ctx context.Context, owner, name string) (*GithubRepository, error)

type GithubRepository

type GithubRepository struct {
	analyze.Repository
	NameWithOwner  string `graphql:"nameWithOwner"`
	IsFork         bool   `graphql:"isFork"`
	IsPrivate      bool   `graphql:"isPrivate"`
	IsMirror       bool   `graphql:"isMirror"`
	IsDisabled     bool   `graphql:"isDisabled"`
	IsEmpty        bool   `graphql:"isEmpty"`
	IsTemplate     bool   `graphql:"isTemplate"`
	StargazerCount int    `graphql:"stargazerCount"`
	ForkCount      int    `graphql:"forkCount"`
}

func (GithubRepository) BuildGitURL

func (gh GithubRepository) BuildGitURL(baseURL string) string

func (GithubRepository) GetIsFork added in v0.10.0

func (gh GithubRepository) GetIsFork() bool

func (GithubRepository) GetProviderName

func (gh GithubRepository) GetProviderName() string

func (GithubRepository) GetRepoIdentifier

func (gh GithubRepository) GetRepoIdentifier() string

type ScmClient

type ScmClient struct {
	analyze.ScmClient
	// contains filtered or unexported fields
}

func NewGithubSCMClient

func NewGithubSCMClient(ctx context.Context, baseURL string, token string) (*ScmClient, error)

func (*ScmClient) GetOrgRepos

func (s *ScmClient) GetOrgRepos(ctx context.Context, org string) <-chan analyze.RepoBatch

func (*ScmClient) GetProviderBaseURL

func (s *ScmClient) GetProviderBaseURL() string

func (*ScmClient) GetProviderName

func (s *ScmClient) GetProviderName() string

func (*ScmClient) GetProviderVersion

func (s *ScmClient) GetProviderVersion(ctx context.Context) (string, error)

func (*ScmClient) GetRepo

func (s *ScmClient) GetRepo(ctx context.Context, org string, name string) (analyze.Repository, error)

func (*ScmClient) GetToken

func (s *ScmClient) GetToken() string

func (*ScmClient) ParseRepoAndOrg

func (s *ScmClient) ParseRepoAndOrg(repoString string) (string, string, error)

Jump to

Keyboard shortcuts

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