Documentation ¶
Index ¶
- func CheckBranch(ctx context.Context, client *github.Client, repoOwner string, repoName string, ...) bool
- func CheckPR(ctx context.Context, client *github.Client, repoOwner string, repoName string, ...) (bool, []*github.PullRequest, error)
- func CleanUpOldBranch(ctx context.Context, client *github.Client, repoOwner string, repoName string, ...)
- func CreateBranch(ctx context.Context, client *github.Client, repoOwner string, repoName string, ...) error
- func CreateGHClient(config githubapp.Config) (githubapp.ClientCreator, error)
- func CreatePR(ctx context.Context, client *github.Client, repoOwner string, repoName string, ...) (*github.PullRequest, error)
- func GetOrganizationClients(config githubapp.Config) ([]*github.Client, error)
- func GetRepoContent(ctx context.Context, client *github.Client, owner string, repo string, ...) ([]byte, *string, error)
- func GetRepos(ctx context.Context, client *github.Client, page int) ([]*github.Repository, error)
- func GetSingleOrganizationClient(cc githubapp.ClientCreator, org string) (*github.Client, error)
- func NewRateLimitTransport(rt http.RoundTripper) *rateLimitTransport
- func UpdateFile(ctx context.Context, client *github.Client, repoOwner string, repoName string, ...) error
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 ¶
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 GetSingleOrganizationClient ¶
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.
Click to show internal directories.
Click to hide internal directories.