Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReplaceGitClientConstructors ¶
func ReplaceGitClientConstructors(c GitRepoClient)
ReplaceGitClientConstructors replaces gitClientConstructors with the given one, TEST USE ONLY.
Types ¶
type GitHubClientImpl ¶
type GitHubClientImpl struct {
// contains filtered or unexported fields
}
GitHubClientImpl implements GitRepoClient which works with GitHub.
func (GitHubClientImpl) CreatePullRequest ¶
func (g GitHubClientImpl) CreatePullRequest(ctx context.Context, payload GitPullRequestPayload) (prNum int, err error)
func (GitHubClientImpl) HealthCheck ¶
func (g GitHubClientImpl) HealthCheck() error
func (GitHubClientImpl) Kind ¶
func (g GitHubClientImpl) Kind() string
type GitPullRequestPayload ¶
type GitRepoClient ¶
type GitRepoClient interface { // Kind returns the kind of git-repo client. Kind() string // HealthCheck sends a simple query with auth-token to confirm that the request reaches and is accepted by remote git-repository. HealthCheck() error // CreatePullRequest creates PullRequest with given parameters. CreatePullRequest(ctx context.Context, payload GitPullRequestPayload) (prNum int, err error) }
func NewGitHubClient ¶
func NewGitHubClient(repoURL string, token string) GitRepoClient
NewGitHubClient creates new GitRepoClient which works with GitHub.
func NewGitRepoClient ¶
func NewGitRepoClient(repoURL string, token string) (GitRepoClient, error)
NewGitRepoClient creates new GitRepoClient for the given git repository kind.
type GitRepoRef ¶
func NewRepoRef ¶
func NewRepoRef(repoURL string) (GitRepoRef, error)
NewRepoRef returns GitRepoRef from the remote hostname.
type NewGitClientFunc ¶
type NewGitClientFunc func(repoURL string, token string) GitRepoClient
Click to show internal directories.
Click to hide internal directories.