githubapi

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitHubApiClient

type GitHubApiClient interface {
	CheckPrIsForInfraAndCreatedByRenovate(ctx context.Context, org, repo string, prNum int) (bool, string, error)
	CreateIssueComment(ctx context.Context, org, repo string, prNum int, body string) error
	CreateLabels(ctx context.Context, org, repo string, prNum int, labels []string) error
	CreatePullRequest(ctx context.Context, org, repo, headBranch, baseBranch, title, body string) (prNum int, err error)
	DeleteBranch(ctx context.Context, org, repo, headBranch string) error
	GetPullRequestTitleAndChangedFilepaths(ctx context.Context, org, repo string, prNum int) (string, []string, error)
	HealthCheck() error
	UpdatePullRequestBody(ctx context.Context, org, repo string, prNum int, body string) error
}

func NewGitHubApiClientImpl

func NewGitHubApiClientImpl(token string) GitHubApiClient

type GitHubApiClientImpl

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

func (*GitHubApiClientImpl) CheckPrIsForInfraAndCreatedByRenovate

func (g *GitHubApiClientImpl) CheckPrIsForInfraAndCreatedByRenovate(ctx context.Context, org, repo string, prNum int) (bool, string, error)

func (*GitHubApiClientImpl) CreateIssueComment

func (g *GitHubApiClientImpl) CreateIssueComment(ctx context.Context, org, repo string, prNum int, body string) error

func (*GitHubApiClientImpl) CreateLabels

func (g *GitHubApiClientImpl) CreateLabels(ctx context.Context, org, repo string, prNum int, labels []string) error

func (*GitHubApiClientImpl) CreatePullRequest

func (g *GitHubApiClientImpl) CreatePullRequest(ctx context.Context, org, repo, headBranch, baseBranch, title, body string) (prNum int, err error)

func (*GitHubApiClientImpl) DeleteBranch

func (g *GitHubApiClientImpl) DeleteBranch(ctx context.Context, org, repo, headBranch string) error

func (*GitHubApiClientImpl) GetPullRequestTitleAndChangedFilepaths

func (g *GitHubApiClientImpl) GetPullRequestTitleAndChangedFilepaths(ctx context.Context, org, repo string, prNum int) (string, []string, error)

func (*GitHubApiClientImpl) HealthCheck

func (g *GitHubApiClientImpl) HealthCheck() error

func (*GitHubApiClientImpl) UpdatePullRequestBody

func (g *GitHubApiClientImpl) UpdatePullRequestBody(ctx context.Context, org, repo string, prNum int, body string) error

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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