implementations

package
v0.0.0-...-081ecb4 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2020 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const GithubProviderName = "github.com"

Variables

This section is empty.

Functions

This section is empty.

Types

type Github

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

func NewGithub

func NewGithub(log logutil.Log, accessToken string) *Github

func (Github) AcceptRepoInvitation

func (p Github) AcceptRepoInvitation(ctx context.Context, invitationID int) error

func (Github) AddCollaborator

func (p Github) AddCollaborator(ctx context.Context, owner, repo, username string) (*provider.RepoInvitation, error)

func (Github) CreateRepoHook

func (p Github) CreateRepoHook(ctx context.Context, owner, repo string,
	hook *provider.HookConfig) (*provider.Hook, error)

func (Github) DeleteRepoHook

func (p Github) DeleteRepoHook(ctx context.Context, owner, repo string, hookID int) error

func (Github) GetBranch

func (p Github) GetBranch(ctx context.Context, owner, repo, branch string) (*provider.Branch, error)

func (Github) GetOrgMembershipByName

func (p Github) GetOrgMembershipByName(ctx context.Context, org string) (*provider.OrgMembership, error)

func (Github) GetPullRequest

func (p Github) GetPullRequest(ctx context.Context, owner, repo string, number int) (*provider.PullRequest, error)

func (Github) GetRepoByName

func (p Github) GetRepoByName(ctx context.Context, owner, repo string) (*provider.Repo, error)

func (Github) LinkToPullRequest

func (p Github) LinkToPullRequest(repo *models.Repo, num int) string

func (Github) ListOrgMemberships

func (p Github) ListOrgMemberships(ctx context.Context, cfg *provider.ListOrgsConfig) ([]provider.OrgMembership, error)

func (Github) ListPullRequestCommits

func (p Github) ListPullRequestCommits(ctx context.Context, owner, repo string, number int) ([]*provider.Commit, error)

func (Github) ListRepoHooks

func (p Github) ListRepoHooks(ctx context.Context, owner, repo string) ([]provider.Hook, error)

func (Github) ListRepos

func (p Github) ListRepos(ctx context.Context, cfg *provider.ListReposConfig) ([]provider.Repo, error)

func (Github) Name

func (p Github) Name() string

func (Github) ParsePullRequestEvent

func (p Github) ParsePullRequestEvent(ctx context.Context, payload []byte) (*provider.PullRequestEvent, error)

func (Github) RemoveCollaborator

func (p Github) RemoveCollaborator(ctx context.Context, owner, repo, username string) error

func (*Github) SetBaseURL

func (p *Github) SetBaseURL(s string) error

func (Github) SetCommitStatus

func (p Github) SetCommitStatus(ctx context.Context, owner, repo, ref string, status *provider.CommitStatus) error

type StableProvider

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

func NewStableProvider

func NewStableProvider(underlying provider.Provider, totalTimeout time.Duration, maxRetries int) *StableProvider

func (StableProvider) AcceptRepoInvitation

func (p StableProvider) AcceptRepoInvitation(ctx context.Context, invitationID int) error

func (StableProvider) AddCollaborator

func (p StableProvider) AddCollaborator(ctx context.Context, owner, repo, username string) (ret *provider.RepoInvitation, err error)

func (StableProvider) CreateRepoHook

func (p StableProvider) CreateRepoHook(ctx context.Context, owner, repo string,
	hook *provider.HookConfig) (ret *provider.Hook, err error)

func (StableProvider) DeleteRepoHook

func (p StableProvider) DeleteRepoHook(ctx context.Context, owner, repo string, hookID int) error

func (StableProvider) GetBranch

func (p StableProvider) GetBranch(ctx context.Context, owner, repo, branch string) (ret *provider.Branch, err error)

func (StableProvider) GetOrgMembershipByName

func (p StableProvider) GetOrgMembershipByName(ctx context.Context, org string) (retOrg *provider.OrgMembership, err error)

func (StableProvider) GetPullRequest

func (p StableProvider) GetPullRequest(ctx context.Context, owner, repo string, number int) (ret *provider.PullRequest, err error)

func (StableProvider) GetRepoByName

func (p StableProvider) GetRepoByName(ctx context.Context, owner, repo string) (retRepo *provider.Repo, err error)

func (StableProvider) LinkToPullRequest

func (p StableProvider) LinkToPullRequest(repo *models.Repo, num int) string

func (StableProvider) ListOrgMemberships

func (p StableProvider) ListOrgMemberships(ctx context.Context, cfg *provider.ListOrgsConfig) (ret []provider.OrgMembership, err error)

func (StableProvider) ListPullRequestCommits

func (p StableProvider) ListPullRequestCommits(ctx context.Context, owner, repo string, number int) (ret []*provider.Commit, err error)

func (StableProvider) ListRepoHooks

func (p StableProvider) ListRepoHooks(ctx context.Context, owner, repo string) (ret []provider.Hook, err error)

func (StableProvider) ListRepos

func (p StableProvider) ListRepos(ctx context.Context, cfg *provider.ListReposConfig) (ret []provider.Repo, err error)

func (StableProvider) Name

func (p StableProvider) Name() string

func (StableProvider) ParsePullRequestEvent

func (p StableProvider) ParsePullRequestEvent(ctx context.Context, payload []byte) (ret *provider.PullRequestEvent, err error)

func (StableProvider) RemoveCollaborator

func (p StableProvider) RemoveCollaborator(ctx context.Context, owner, repo, username string) error

func (StableProvider) SetBaseURL

func (p StableProvider) SetBaseURL(s string) error

func (StableProvider) SetCommitStatus

func (p StableProvider) SetCommitStatus(ctx context.Context, owner, repo, ref string, status *provider.CommitStatus) error

Jump to

Keyboard shortcuts

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