ghapp

package
v0.0.0-...-cb886e6 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const CheckName string = "Ergomake"

Variables

View Source
var BranchNotFoundError = errors.New("branch not found")
View Source
var InstallationNotFoundError = errors.New("installation not found")
View Source
var RepoNotFoundError = errors.New("repository not found")

Functions

This section is empty.

Types

type GHAppClient

type GHAppClient interface {
	git.RemoteGitClient
	CreateCommitStatus(ctx context.Context, owner, repo, sha, state string, targetURL *string) error
	UpsertComment(
		ctx context.Context,
		owner string, repo string, prNumber int, commentID int64, comment string,
	) (*github.IssueComment, error)
	ListOwnerInstalledRepos(ctx context.Context, owner string) ([]*github.Repository, error)
	IsOwnerInstalled(ctx context.Context, owner string) (bool, error)
	GetInstallation(ctx context.Context, installationID int64) (*github.Installation, error)
	ListInstalledOwners(ctx context.Context) ([]string, error)
	CreatePullRequest(
		ctx context.Context,
		owner, repo, branchPrefix string,
		changes map[string]string,
		title, description string,
	) (*github.PullRequest, error)
	GetBranchSHA(ctx context.Context, owner, repo, branch string) (string, error)
	ListBranches(ctx context.Context, owner, repo string) ([]string, error)
	IsRepoPrivate(ctx context.Context, owner, repo string) (bool, error)
}

func NewGithubClient

func NewGithubClient(privateKey string, appId int64) (GHAppClient, error)

Jump to

Keyboard shortcuts

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