Documentation ¶
Index ¶
- func CreateOrgRepository(provider gitprovider.Client, orgRepoRef gitprovider.OrgRepositoryRef, ...) error
- func CreatePullRequestToOrgRepo(provider gitprovider.Client, orgRepRef gitprovider.OrgRepositoryRef, ...) error
- func CreatePullRequestToUserRepo(provider gitprovider.Client, userRepRef gitprovider.UserRepositoryRef, ...) error
- func CreateRepository(name string, owner string, private bool) error
- func CreateUserRepository(provider gitprovider.Client, userRepoRef gitprovider.UserRepositoryRef, ...) error
- func GetGitlabProvider() (gitprovider.Client, error)
- func GetOrgRepo(provider gitprovider.Client, org string, repoName string) error
- func GetRepoInfo(provider gitprovider.Client, accountType ProviderAccountType, owner string, ...) error
- func GetUserRepo(provider gitprovider.Client, user string, repoName string) error
- func GithubProvider() (gitprovider.Client, error)
- func NewOrgRepositoryRef(domain, org, repoName string) gitprovider.OrgRepositoryRef
- func NewRepositoryInfo(description string, visibility gitprovider.RepositoryVisibility) gitprovider.RepositoryInfo
- func NewUserRepositoryRef(domain, user, repoName string) gitprovider.UserRepositoryRef
- func Override(handler GitProviderHandler) override.Override
- func RepositoryExists(name string, owner string) (bool, error)
- func SetGithubProvider(githubProviderClient gitprovider.Client)
- func WithGithubProviderHandler(handler GithubProviderHandler, fun func() error) error
- type GitProviderHandler
- type GithubProviderHandler
- type ProviderAccountType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateOrgRepository ¶
func CreateOrgRepository(provider gitprovider.Client, orgRepoRef gitprovider.OrgRepositoryRef, repoInfo gitprovider.RepositoryInfo, opts ...gitprovider.RepositoryCreateOption) error
func CreatePullRequestToOrgRepo ¶
func CreatePullRequestToOrgRepo(provider gitprovider.Client, orgRepRef gitprovider.OrgRepositoryRef, targetBranch string, newBranch string, files []gitprovider.CommitFile, commitMessage string, prTitle string, prDescription string) error
func CreatePullRequestToUserRepo ¶
func CreatePullRequestToUserRepo(provider gitprovider.Client, userRepRef gitprovider.UserRepositoryRef, targetBranch string, newBranch string, files []gitprovider.CommitFile, commitMessage string, prTitle string, prDescription string) error
func CreateRepository ¶ added in v0.0.4
func CreateUserRepository ¶
func CreateUserRepository(provider gitprovider.Client, userRepoRef gitprovider.UserRepositoryRef, repoInfo gitprovider.RepositoryInfo, opts ...gitprovider.RepositoryCreateOption) error
func GetGitlabProvider ¶
func GetGitlabProvider() (gitprovider.Client, error)
func GetOrgRepo ¶ added in v0.0.4
func GetOrgRepo(provider gitprovider.Client, org string, repoName string) error
func GetRepoInfo ¶ added in v0.0.4
func GetRepoInfo(provider gitprovider.Client, accountType ProviderAccountType, owner string, repoName string) error
func GetUserRepo ¶ added in v0.0.4
func GetUserRepo(provider gitprovider.Client, user string, repoName string) error
func GithubProvider ¶
func GithubProvider() (gitprovider.Client, error)
func NewOrgRepositoryRef ¶
func NewOrgRepositoryRef(domain, org, repoName string) gitprovider.OrgRepositoryRef
func NewRepositoryInfo ¶
func NewRepositoryInfo(description string, visibility gitprovider.RepositoryVisibility) gitprovider.RepositoryInfo
func NewUserRepositoryRef ¶
func NewUserRepositoryRef(domain, user, repoName string) gitprovider.UserRepositoryRef
func Override ¶ added in v0.0.4
func Override(handler GitProviderHandler) override.Override
func RepositoryExists ¶ added in v0.0.4
func SetGithubProvider ¶ added in v0.0.4
func SetGithubProvider(githubProviderClient gitprovider.Client)
func WithGithubProviderHandler ¶ added in v0.0.4
func WithGithubProviderHandler(handler GithubProviderHandler, fun func() error) error
Types ¶
type GitProviderHandler ¶ added in v0.0.4
type GitProviderHandler interface { CreateRepository(name string, owner string, private bool) error RepositoryExists(name string, owner string) (bool, error) }
GitProvider Handler
type GithubProviderHandler ¶ added in v0.0.4
type GithubProviderHandler interface { GithubProvider() (gitprovider.Client, error) SetGithubProvider(githubProviderClient gitprovider.Client) }
GithubProvider shim
type ProviderAccountType ¶ added in v0.0.4
type ProviderAccountType string
const ( AccountTypeUser ProviderAccountType = "user" AccountTypeOrg ProviderAccountType = "organization" )
func GetAccountType ¶ added in v0.0.4
func GetAccountType(provider gitprovider.Client, owner string) (ProviderAccountType, error)
Click to show internal directories.
Click to hide internal directories.