gh

package
v0.0.0-...-cc8cc2f Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckBranch

func CheckBranch(ctx context.Context, client *github.Client, repoOwner string, repoName string, commitBranch *string) bool

CheckBranch checks if a branch already exists, in order to skip CreateBranch if needed

func CheckPR

func CheckPR(ctx context.Context, client *github.Client, repoOwner string, repoName string, baseBranch string, commitBranch string, commitMessage string, component string) (bool, []*github.PullRequest, error)

CheckPR .

func CleanUpOldBranch

func CleanUpOldBranch(ctx context.Context, client *github.Client, repoOwner string, repoName string, PRs []*github.PullRequest, newPR int)

CleanUpOldBranch comments the old pull request and deletes the old branch

func CreateBranch

func CreateBranch(ctx context.Context, client *github.Client, repoOwner string, repoName string, baseBranch string, commitBranch *string) error

CreateBranch creates a new commit branch for a specific update

func CreateGHClient

func CreateGHClient(config githubapp.Config) (githubapp.ClientCreator, error)

func CreatePR

func CreatePR(ctx context.Context, client *github.Client, repoOwner string, repoName string, reviewers []string, assignees []string, labels []string, options *github.NewPullRequest) (*github.PullRequest, error)

CreatePR creates a pull request with the new config

func GetOrganizationClients

func GetOrganizationClients(config githubapp.Config) ([]*github.Client, error)

GetOrganizationClients returns a github client

func GetRepoContent

func GetRepoContent(ctx context.Context, client *github.Client, owner string, repo string, file string, branch string) ([]byte, *string, error)

GetRepoContent returns the circleci config as a byte array

func GetRepos

func GetRepos(ctx context.Context, client *github.Client, page int) ([]*github.Repository, error)

GetRepos returns a list of repos for an orginasation

func GetSingleOrganizationClient

func GetSingleOrganizationClient(cc githubapp.ClientCreator, org string) (*github.Client, error)

GetSingleOrganizationClient returns a single github client

func NewRateLimitTransport

func NewRateLimitTransport(rt http.RoundTripper) *rateLimitTransport

func UpdateFile

func UpdateFile(ctx context.Context, client *github.Client, repoOwner string, repoName string, file string, options *github.RepositoryContentFileOptions) error

UpdateFile updates the circleci config and creates a commit we ignore conflicts as it saves us API calls and avoids GHs ratelimit

Types

This section is empty.

Jump to

Keyboard shortcuts

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