github

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBranchProtectionDeletion = errors.New("error deleting branch protection rules")
	ErrRepositoryNotFound       = errors.New("repository not found")
	ErrIssueNotFound            = errors.New("issue not found")
)

Functions

This section is empty.

Types

type BranchProtectionRule

type BranchProtectionRule struct {
	Nodes []struct {
		Id string
	}
	PageInfo struct {
		EndCursor   githubv4.String
		HasNextPage bool
	}
}

type GEI

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

func NewGEI

func NewGEI(source, target, sourceToken, targetToken string) GEI

func (*GEI) MigrateCodeScanning

func (gei *GEI) MigrateCodeScanning(repository string) error

func (*GEI) MigrateRepo

func (gei *GEI) MigrateRepo(repository string) error

func (*GEI) MigrateSecretScanning

func (gei *GEI) MigrateSecretScanning(repository string) error

type GitHubClient

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

func NewGitHubClient

func NewGitHubClient(ctx context.Context, logger *slog.Logger, token string) (*GitHubClient, error)

func (*GitHubClient) ArchiveRepository

func (gc *GitHubClient) ArchiveRepository(ctx context.Context, organization string, repository string) error

func (*GitHubClient) ChangeArchiveRepository

func (gc *GitHubClient) ChangeArchiveRepository(
	ctx context.Context, organization string, repository string, archive bool) error

func (*GitHubClient) ChangeGHASOrgSettings

func (gc *GitHubClient) ChangeGHASOrgSettings(ctx context.Context, organization string, activate bool) error

func (*GitHubClient) ChangeGhasRepoSettings

func (gc *GitHubClient) ChangeGhasRepoSettings(ctx context.Context, organization string, repository Repository, ghas string, secretScanning string, pushProtection string) error

func (*GitHubClient) ChangeRepositoryVisibility

func (gc *GitHubClient) ChangeRepositoryVisibility(ctx context.Context, organization string, repository string, visibility string) error

func (*GitHubClient) CreateIssue

func (gc *GitHubClient) CreateIssue(ctx context.Context, organization string, repository string, title string, body string) error

func (*GitHubClient) CreateRepository

func (gc *GitHubClient) CreateRepository(ctx context.Context, organization string, repository string) error

func (*GitHubClient) DeleteBranchProtections

func (gc *GitHubClient) DeleteBranchProtections(ctx context.Context, organization string, repository string) error

func (*GitHubClient) DisableWorkflowsForRepository

func (gc *GitHubClient) DisableWorkflowsForRepository(
	ctx context.Context, organization string, repository string, workflows []Workflow) error

func (*GitHubClient) EnableWorkflowsForRepository

func (gc *GitHubClient) EnableWorkflowsForRepository(
	ctx context.Context, organization string, repository string, workflows []Workflow) error

func (*GitHubClient) GetAllActiveWorkflowsForRepository

func (gc *GitHubClient) GetAllActiveWorkflowsForRepository(
	ctx context.Context, organization string, repository string) ([]Workflow, error)

func (*GitHubClient) GetAllWorkflowsForRepository

func (gc *GitHubClient) GetAllWorkflowsForRepository(ctx context.Context, organization string, repository string) ([]Workflow, error)

func (*GitHubClient) GetCodeScanningAnalysis

func (gc *GitHubClient) GetCodeScanningAnalysis(
	ctx context.Context, organization string, repository string, defaultBranch string) ([]ScanningAnalysis, error)

func (*GitHubClient) GetIssue

func (gc *GitHubClient) GetIssue(ctx context.Context, organization string, repository string, issueNumber int) (Issue, error)

func (*GitHubClient) GetRepositories

func (gc *GitHubClient) GetRepositories(ctx context.Context, org string) ([]Repository, error)

func (*GitHubClient) GetRepository

func (gc *GitHubClient) GetRepository(ctx context.Context, repoName string, org string) (Repository, error)

func (*GitHubClient) UnarchiveRepository

func (gc *GitHubClient) UnarchiveRepository(ctx context.Context, organization string, repository string) error

type Issue

type Issue *github.Issue

type Repository

type Repository *github.Repository

type ScanningAnalysis

type ScanningAnalysis *github.ScanningAnalysis

type Workflow

type Workflow *github.Workflow

Jump to

Keyboard shortcuts

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