Documentation ¶
Index ¶
- Constants
- Variables
- func BitBucketCloudAccessTokenURL(url string, username string) string
- func BitBucketServerAccessTokenURL(url string) string
- func GenerateMarkdown(releaseSpec *v1.ReleaseSpec, gitInfo *GitRepositoryInfo) (string, error)
- func GetHost(gitProvider GitProvider) (string, error)
- func GetOrganizations(orgLister OrganisationLister, userName string) []string
- func GitHubAccessTokenURL(url string) string
- func GitHubEnterpriseApiEndpointURL(u string) string
- func GiteaAccessTokenURL(url string) string
- func GitlabAccessTokenURL(url string) string
- func IsGitHubServerURL(u string) bool
- func IsGitLabServerURL(u string) bool
- func IsGitRepoStatusFailed(statuses ...*GitRepoStatus) bool
- func IsGitRepoStatusSuccess(statuses ...*GitRepoStatus) bool
- func PickOrganisation(orgLister OrganisationLister, userName string, in terminal.FileReader, ...) (string, error)
- func ProviderAccessTokenURL(kind string, url string, username string) string
- func ReleaseDownloadCount(releases []*GitRelease) int
- func SaasGitKind(gitServiceUrl string) string
- type BitbucketCloudProvider
- func (b *BitbucketCloudProvider) AcceptInvitation(ID int64) (*github.Response, error)
- func (b *BitbucketCloudProvider) AddCollaborator(user string, organisation string, repo string) error
- func (b *BitbucketCloudProvider) AddPRComment(pr *GitPullRequest, comment string) error
- func (b *BitbucketCloudProvider) BranchArchiveURL(org string, name string, branch string) string
- func (b *BitbucketCloudProvider) CreateIssue(owner string, repo string, issue *GitIssue) (*GitIssue, error)
- func (b *BitbucketCloudProvider) CreateIssueComment(owner string, repo string, number int, comment string) error
- func (b *BitbucketCloudProvider) CreatePullRequest(data *GitPullRequestArguments) (*GitPullRequest, error)
- func (b *BitbucketCloudProvider) CreateRepository(org string, name string, private bool) (*GitRepository, error)
- func (b *BitbucketCloudProvider) CreateWebHook(data *GitWebHookArguments) error
- func (p *BitbucketCloudProvider) CurrentUsername() string
- func (b *BitbucketCloudProvider) DeleteRepository(org string, name string) error
- func (b *BitbucketCloudProvider) ForkRepository(originalOrg string, name string, destinationOrg string) (*GitRepository, error)
- func (b *BitbucketCloudProvider) GetIssue(org string, name string, number int) (*GitIssue, error)
- func (p *BitbucketCloudProvider) GetPullRequest(owner string, repoInfo *GitRepositoryInfo, number int) (*GitPullRequest, error)
- func (b *BitbucketCloudProvider) GetPullRequestCommits(owner string, repository *GitRepositoryInfo, number int) ([]*GitCommit, error)
- func (b *BitbucketCloudProvider) GetRepository(org string, name string) (*GitRepository, error)
- func (b *BitbucketCloudProvider) GitIssueToBitbucketIssue(gIssue GitIssue) bitbucket.Issue
- func (b *BitbucketCloudProvider) HasIssues() bool
- func (b *BitbucketCloudProvider) IsBitbucketCloud() bool
- func (b *BitbucketCloudProvider) IsBitbucketServer() bool
- func (b *BitbucketCloudProvider) IsGerrit() bool
- func (b *BitbucketCloudProvider) IsGitHub() bool
- func (b *BitbucketCloudProvider) IsGitea() bool
- func (p *BitbucketCloudProvider) IssueURL(org string, name string, number int, isPull bool) string
- func (b *BitbucketCloudProvider) JenkinsWebHookPath(gitURL string, secret string) string
- func (b *BitbucketCloudProvider) Kind() string
- func (b *BitbucketCloudProvider) Label() string
- func (b *BitbucketCloudProvider) ListCommitStatus(org string, repo string, sha string) ([]*GitRepoStatus, error)
- func (b *BitbucketCloudProvider) ListInvitations() ([]*github.RepositoryInvitation, *github.Response, error)
- func (b *BitbucketCloudProvider) ListOrganisations() ([]GitOrganisation, error)
- func (p *BitbucketCloudProvider) ListReleases(org string, name string) ([]*GitRelease, error)
- func (b *BitbucketCloudProvider) ListRepositories(org string) ([]*GitRepository, error)
- func (b *BitbucketCloudProvider) MergePullRequest(pr *GitPullRequest, message string) error
- func (b *BitbucketCloudProvider) PullRequestLastCommitStatus(pr *GitPullRequest) (string, error)
- func (b *BitbucketCloudProvider) RenameRepository(org string, name string, newName string) (*GitRepository, error)
- func (b *BitbucketCloudProvider) SearchIssues(org string, name string, query string) ([]*GitIssue, error)
- func (b *BitbucketCloudProvider) SearchIssuesClosedSince(org string, name string, t time.Time) ([]*GitIssue, error)
- func (b *BitbucketCloudProvider) ServerURL() string
- func (b *BitbucketCloudProvider) UpdatePullRequestStatus(pr *GitPullRequest) error
- func (b *BitbucketCloudProvider) UpdateRelease(owner string, repo string, tag string, releaseInfo *GitRelease) error
- func (p *BitbucketCloudProvider) UserAuth() auth.UserAuth
- func (p *BitbucketCloudProvider) UserInfo(username string) *GitUser
- func (b *BitbucketCloudProvider) ValidateRepositoryName(org string, name string) error
- type BitbucketServerProvider
- func (b *BitbucketServerProvider) AcceptInvitation(ID int64) (*github.Response, error)
- func (b *BitbucketServerProvider) AddCollaborator(user string, organisation string, repo string) error
- func (b *BitbucketServerProvider) AddPRComment(pr *GitPullRequest, comment string) error
- func (b *BitbucketServerProvider) BranchArchiveURL(org string, name string, branch string) string
- func (b *BitbucketServerProvider) CreateIssue(owner string, repo string, issue *GitIssue) (*GitIssue, error)
- func (b *BitbucketServerProvider) CreateIssueComment(owner string, repo string, number int, comment string) error
- func (b *BitbucketServerProvider) CreatePullRequest(data *GitPullRequestArguments) (*GitPullRequest, error)
- func (b *BitbucketServerProvider) CreateRepository(org, name string, private bool) (*GitRepository, error)
- func (b *BitbucketServerProvider) CreateWebHook(data *GitWebHookArguments) error
- func (b *BitbucketServerProvider) CurrentUsername() string
- func (b *BitbucketServerProvider) DeleteRepository(org, name string) error
- func (b *BitbucketServerProvider) ForkRepository(originalOrg, name, destinationOrg string) (*GitRepository, error)
- func (b *BitbucketServerProvider) GetIssue(org string, name string, number int) (*GitIssue, error)
- func (b *BitbucketServerProvider) GetPullRequest(owner string, repo *GitRepositoryInfo, number int) (*GitPullRequest, error)
- func (b *BitbucketServerProvider) GetPullRequestCommits(owner string, repository *GitRepositoryInfo, number int) ([]*GitCommit, error)
- func (b *BitbucketServerProvider) GetRepository(org string, name string) (*GitRepository, error)
- func (b *BitbucketServerProvider) HasIssues() bool
- func (b *BitbucketServerProvider) IsBitbucketCloud() bool
- func (b *BitbucketServerProvider) IsBitbucketServer() bool
- func (b *BitbucketServerProvider) IsGerrit() bool
- func (b *BitbucketServerProvider) IsGitHub() bool
- func (b *BitbucketServerProvider) IsGitea() bool
- func (b *BitbucketServerProvider) IssueURL(org string, name string, number int, isPull bool) string
- func (b *BitbucketServerProvider) JenkinsWebHookPath(gitURL string, secret string) string
- func (b *BitbucketServerProvider) Kind() string
- func (b *BitbucketServerProvider) Label() string
- func (b *BitbucketServerProvider) ListCommitStatus(org, repo, sha string) ([]*GitRepoStatus, error)
- func (b *BitbucketServerProvider) ListInvitations() ([]*github.RepositoryInvitation, *github.Response, error)
- func (b *BitbucketServerProvider) ListOrganisations() ([]GitOrganisation, error)
- func (b *BitbucketServerProvider) ListReleases(org string, name string) ([]*GitRelease, error)
- func (b *BitbucketServerProvider) ListRepositories(org string) ([]*GitRepository, error)
- func (b *BitbucketServerProvider) MergePullRequest(pr *GitPullRequest, message string) error
- func (b *BitbucketServerProvider) PullRequestLastCommitStatus(pr *GitPullRequest) (string, error)
- func (b *BitbucketServerProvider) RenameRepository(org, name, newName string) (*GitRepository, error)
- func (b *BitbucketServerProvider) SearchIssues(org string, name string, query string) ([]*GitIssue, error)
- func (b *BitbucketServerProvider) SearchIssuesClosedSince(org string, name string, t time.Time) ([]*GitIssue, error)
- func (b *BitbucketServerProvider) ServerURL() string
- func (b *BitbucketServerProvider) UpdatePullRequestStatus(pr *GitPullRequest) error
- func (b *BitbucketServerProvider) UpdateRelease(owner string, repo string, tag string, releaseInfo *GitRelease) error
- func (b *BitbucketServerProvider) UserAuth() auth.UserAuth
- func (b *BitbucketServerProvider) UserInfo(username string) *GitUser
- func (b *BitbucketServerProvider) ValidateRepositoryName(org, name string) error
- type CommitGroup
- type CommitInfo
- type CommitStatus
- type CreateRepoData
- type FakeCommit
- type FakeIssue
- type FakeProvider
- func (f *FakeProvider) AcceptInvitation(ID int64) (*github.Response, error)
- func (f *FakeProvider) AddCollaborator(user string, organisation string, repo string) error
- func (f *FakeProvider) AddPRComment(pr *GitPullRequest, comment string) error
- func (f *FakeProvider) BranchArchiveURL(org string, name string, branch string) string
- func (f *FakeProvider) CreateIssue(owner string, repoName string, issue *GitIssue) (*GitIssue, error)
- func (f *FakeProvider) CreateIssueComment(owner string, repoName string, number int, comment string) error
- func (f *FakeProvider) CreatePullRequest(data *GitPullRequestArguments) (*GitPullRequest, error)
- func (f *FakeProvider) CreateRepository(org string, name string, private bool) (*GitRepository, error)
- func (f *FakeProvider) CreateWebHook(data *GitWebHookArguments) error
- func (f *FakeProvider) CurrentUsername() string
- func (f *FakeProvider) DeleteRepository(org string, name string) error
- func (f *FakeProvider) ForkRepository(originalOrg string, name string, destinationOrg string) (*GitRepository, error)
- func (f *FakeProvider) GetIssue(org string, name string, number int) (*GitIssue, error)
- func (f *FakeProvider) GetPullRequest(owner string, repo *GitRepositoryInfo, number int) (*GitPullRequest, error)
- func (f *FakeProvider) GetPullRequestCommits(owner string, repo *GitRepositoryInfo, number int) ([]*GitCommit, error)
- func (f *FakeProvider) GetRepository(org string, name string) (*GitRepository, error)
- func (f *FakeProvider) HasIssues() bool
- func (f *FakeProvider) IsBitbucketCloud() bool
- func (f *FakeProvider) IsBitbucketServer() bool
- func (f *FakeProvider) IsGerrit() bool
- func (f *FakeProvider) IsGitHub() bool
- func (f *FakeProvider) IsGitea() bool
- func (f *FakeProvider) IssueURL(org string, name string, number int, isPull bool) string
- func (f *FakeProvider) JenkinsWebHookPath(gitURL string, secret string) string
- func (f *FakeProvider) Kind() string
- func (f *FakeProvider) Label() string
- func (f *FakeProvider) ListCommitStatus(org string, repoName string, sha string) ([]*GitRepoStatus, error)
- func (f *FakeProvider) ListInvitations() ([]*github.RepositoryInvitation, *github.Response, error)
- func (f *FakeProvider) ListOrganisations() ([]GitOrganisation, error)
- func (f *FakeProvider) ListReleases(org string, name string) ([]*GitRelease, error)
- func (f *FakeProvider) ListRepositories(org string) ([]*GitRepository, error)
- func (f *FakeProvider) MergePullRequest(pr *GitPullRequest, message string) error
- func (f *FakeProvider) PullRequestLastCommitStatus(pr *GitPullRequest) (string, error)
- func (f *FakeProvider) RenameRepository(org string, name string, newName string) (*GitRepository, error)
- func (f *FakeProvider) SearchIssues(org string, name string, query string) ([]*GitIssue, error)
- func (f *FakeProvider) SearchIssuesClosedSince(org string, name string, t time.Time) ([]*GitIssue, error)
- func (f *FakeProvider) ServerURL() string
- func (f *FakeProvider) UpdatePullRequestStatus(pr *GitPullRequest) error
- func (f *FakeProvider) UpdateRelease(owner string, repoName string, tag string, releaseInfo *GitRelease) error
- func (f *FakeProvider) UserAuth() auth.UserAuth
- func (f *FakeProvider) UserInfo(username string) *GitUser
- func (f *FakeProvider) ValidateRepositoryName(org string, name string) error
- type FakeProviderType
- type FakePullRequest
- type FakeRepository
- type GerritProvider
- func (p *GerritProvider) AcceptInvitation(ID int64) (*github.Response, error)
- func (p *GerritProvider) AddCollaborator(user string, organisation string, repo string) error
- func (p *GerritProvider) AddPRComment(pr *GitPullRequest, comment string) error
- func (p *GerritProvider) BranchArchiveURL(org string, name string, branch string) string
- func (p *GerritProvider) CreateIssue(owner string, repo string, issue *GitIssue) (*GitIssue, error)
- func (p *GerritProvider) CreateIssueComment(owner string, repo string, number int, comment string) error
- func (p *GerritProvider) CreatePullRequest(data *GitPullRequestArguments) (*GitPullRequest, error)
- func (p *GerritProvider) CreateRepository(org string, name string, private bool) (*GitRepository, error)
- func (p *GerritProvider) CreateWebHook(data *GitWebHookArguments) error
- func (p *GerritProvider) CurrentUsername() string
- func (p *GerritProvider) DeleteRepository(org string, name string) error
- func (p *GerritProvider) ForkRepository(originalOrg string, name string, destinationOrg string) (*GitRepository, error)
- func (p *GerritProvider) GetIssue(org string, name string, number int) (*GitIssue, error)
- func (p *GerritProvider) GetPullRequest(owner string, repo *GitRepositoryInfo, number int) (*GitPullRequest, error)
- func (p *GerritProvider) GetPullRequestCommits(owner string, repo *GitRepositoryInfo, number int) ([]*GitCommit, error)
- func (p *GerritProvider) GetRepository(org string, name string) (*GitRepository, error)
- func (p *GerritProvider) HasIssues() bool
- func (p *GerritProvider) IsBitbucketCloud() bool
- func (p *GerritProvider) IsBitbucketServer() bool
- func (p *GerritProvider) IsGerrit() bool
- func (p *GerritProvider) IsGitHub() bool
- func (p *GerritProvider) IsGitea() bool
- func (p *GerritProvider) IssueURL(org string, name string, number int, isPull bool) string
- func (p *GerritProvider) JenkinsWebHookPath(gitURL string, secret string) string
- func (p *GerritProvider) Kind() string
- func (p *GerritProvider) Label() string
- func (p *GerritProvider) ListCommitStatus(org string, repo string, sha string) ([]*GitRepoStatus, error)
- func (p *GerritProvider) ListInvitations() ([]*github.RepositoryInvitation, *github.Response, error)
- func (p *GerritProvider) ListReleases(org string, name string) ([]*GitRelease, error)
- func (p *GerritProvider) ListRepositories(org string) ([]*GitRepository, error)
- func (p *GerritProvider) MergePullRequest(pr *GitPullRequest, message string) error
- func (p *GerritProvider) PullRequestLastCommitStatus(pr *GitPullRequest) (string, error)
- func (p *GerritProvider) RenameRepository(org string, name string, newName string) (*GitRepository, error)
- func (p *GerritProvider) SearchIssues(org string, name string, query string) ([]*GitIssue, error)
- func (p *GerritProvider) SearchIssuesClosedSince(org string, name string, t time.Time) ([]*GitIssue, error)
- func (p *GerritProvider) ServerURL() string
- func (p *GerritProvider) UpdatePullRequestStatus(pr *GitPullRequest) error
- func (p *GerritProvider) UpdateRelease(owner string, repo string, tag string, releaseInfo *GitRelease) error
- func (p *GerritProvider) UserAuth() auth.UserAuth
- func (p *GerritProvider) UserInfo(username string) *GitUser
- func (p *GerritProvider) ValidateRepositoryName(org string, name string) error
- type GitCLI
- func (g *GitCLI) Add(dir string, args ...string) error
- func (g *GitCLI) AddCommmit(dir string, msg string) error
- func (g *GitCLI) AddRemote(dir string, name string, url string) error
- func (g *GitCLI) Branch(dir string) (string, error)
- func (g *GitCLI) Checkout(dir string, branch string) error
- func (g *GitCLI) CheckoutRemoteBranch(dir string, branch string) error
- func (g *GitCLI) Clone(url string, dir string) error
- func (g *GitCLI) CloneOrPull(url string, dir string) error
- func (g *GitCLI) CommitDir(dir string, message string) error
- func (g *GitCLI) CommitIfChanges(dir string, message string) error
- func (g *GitCLI) ConvertToValidBranchName(name string) string
- func (g *GitCLI) CreateBranch(dir string, branch string) error
- func (g *GitCLI) CreatePushURL(cloneURL string, userAuth *auth.UserAuth) (string, error)
- func (g *GitCLI) CreateTag(dir string, tag string, msg string) error
- func (g *GitCLI) DeleteRemoteBranch(dir string, remoteName string, branch string) error
- func (g *GitCLI) DiscoverRemoteGitURL(gitConf string) (string, error)
- func (g *GitCLI) DiscoverUpstreamGitURL(gitConf string) (string, error)
- func (g *GitCLI) Email(dir string) (string, error)
- func (g *GitCLI) FetchTags(dir string) error
- func (g *GitCLI) FindGitConfigDir(dir string) (string, string, error)
- func (g *GitCLI) ForcePushBranch(dir string, localBranch string, remoteBranch string) error
- func (g *GitCLI) GetAuthorEmailForCommit(dir string, sha string) (string, error)
- func (g *GitCLI) GetCurrentGitTagSHA(dir string) (string, error)
- func (g *GitCLI) GetPreviousGitTagSHA(dir string) (string, error)
- func (g *GitCLI) GetRemoteUrl(config *gitcfg.Config, name string) string
- func (g *GitCLI) GetRevisionBeforeDate(dir string, t time.Time) (string, error)
- func (g *GitCLI) GetRevisionBeforeDateText(dir string, dateText string) (string, error)
- func (g *GitCLI) HasChanges(dir string) (bool, error)
- func (g *GitCLI) Info(dir string) (*GitRepositoryInfo, error)
- func (g *GitCLI) Init(dir string) error
- func (g *GitCLI) IsFork(gitProvider GitProvider, gitInfo *GitRepositoryInfo, dir string) (bool, error)
- func (g *GitCLI) PrintCreateRepositoryGenerateAccessToken(server *auth.AuthServer, username string, o io.Writer)
- func (g *GitCLI) Pull(dir string) error
- func (g *GitCLI) PullRemoteBranches(dir string) error
- func (g *GitCLI) PullUpstream(dir string) error
- func (g *GitCLI) Push(dir string) error
- func (g *GitCLI) PushMaster(dir string) error
- func (g *GitCLI) PushTag(dir string, tag string) error
- func (g *GitCLI) RemoteBranchNames(dir string, prefix string) ([]string, error)
- func (g *GitCLI) RemoteBranches(dir string) ([]string, error)
- func (g *GitCLI) Remove(dir, fileName string) error
- func (g *GitCLI) RepoName(org, repoName string) string
- func (g *GitCLI) Server(dir string) (string, error)
- func (g *GitCLI) SetEmail(dir string, email string) error
- func (g *GitCLI) SetRemoteURL(dir string, name string, gitURL string) error
- func (g *GitCLI) SetUsername(dir string, username string) error
- func (g *GitCLI) Stash(dir string) error
- func (g *GitCLI) Status(dir string) error
- func (g *GitCLI) Tags(dir string) ([]string, error)
- func (g *GitCLI) ToGitLabels(names []string) []GitLabel
- func (g *GitCLI) UpdateRemote(dir, url string) error
- func (g *GitCLI) Username(dir string) (string, error)
- func (g *GitCLI) Version() (string, error)
- type GitCommit
- type GitFake
- func (g *GitFake) Add(dir string, args ...string) error
- func (g *GitFake) AddCommmit(dir string, msg string) error
- func (g *GitFake) AddRemote(dir string, name string, url string) error
- func (g *GitFake) Branch(dir string) (string, error)
- func (g *GitFake) Checkout(dir string, branch string) error
- func (g *GitFake) CheckoutRemoteBranch(dir string, branch string) error
- func (g *GitFake) Clone(url string, directory string) error
- func (g *GitFake) CloneOrPull(url string, directory string) error
- func (g *GitFake) CommitDir(dir string, message string) error
- func (g *GitFake) CommitIfChanges(dir string, message string) error
- func (g *GitFake) ConvertToValidBranchName(name string) string
- func (g *GitFake) CreateBranch(dir string, branch string) error
- func (g *GitFake) CreatePushURL(cloneURL string, userAuth *auth.UserAuth) (string, error)
- func (g *GitFake) CreateTag(dir string, tag string, msg string) error
- func (g *GitFake) DeleteRemoteBranch(dir string, remoteName string, branch string) error
- func (g *GitFake) DiscoverRemoteGitURL(gitConf string) (string, error)
- func (g *GitFake) DiscoverUpstreamGitURL(gitConf string) (string, error)
- func (g *GitFake) Email(dir string) (string, error)
- func (g *GitFake) FetchTags(dir string) error
- func (g *GitFake) FindGitConfigDir(dir string) (string, string, error)
- func (g *GitFake) ForcePushBranch(dir string, localBranch string, remoteBranch string) error
- func (g *GitFake) GetAuthorEmailForCommit(dir string, sha string) (string, error)
- func (g *GitFake) GetCurrentGitTagSHA(dir string) (string, error)
- func (g *GitFake) GetPreviousGitTagSHA(dir string) (string, error)
- func (g *GitFake) GetRemoteUrl(config *gitcfg.Config, name string) string
- func (g *GitFake) GetRevisionBeforeDate(dir string, t time.Time) (string, error)
- func (g *GitFake) GetRevisionBeforeDateText(dir string, dateText string) (string, error)
- func (g *GitFake) HasChanges(dir string) (bool, error)
- func (g *GitFake) Info(dir string) (*GitRepositoryInfo, error)
- func (g *GitFake) Init(dir string) error
- func (g *GitFake) IsFork(gitProvider GitProvider, gitInfo *GitRepositoryInfo, dir string) (bool, error)
- func (g *GitFake) PrintCreateRepositoryGenerateAccessToken(server *auth.AuthServer, username string, o io.Writer)
- func (g *GitFake) Pull(dir string) error
- func (g *GitFake) PullRemoteBranches(dir string) error
- func (g *GitFake) PullUpstream(dir string) error
- func (g *GitFake) Push(dir string) error
- func (g *GitFake) PushMaster(dir string) error
- func (g *GitFake) PushTag(dir string, tag string) error
- func (g *GitFake) RemoteBranchNames(dir string, prefix string) ([]string, error)
- func (g *GitFake) RemoteBranches(dir string) ([]string, error)
- func (g *GitFake) Remove(dir string, fileName string) error
- func (g *GitFake) RepoName(org string, repoName string) string
- func (g *GitFake) Server(dir string) (string, error)
- func (g *GitFake) SetEmail(dir string, email string) error
- func (g *GitFake) SetRemoteURL(dir string, name string, gitURL string) error
- func (g *GitFake) SetUsername(dir string, username string) error
- func (g *GitFake) Stash(dir string) error
- func (g *GitFake) Status(dir string) error
- func (g *GitFake) Tags(dir string) ([]string, error)
- func (g *GitFake) ToGitLabels(names []string) []GitLabel
- func (g *GitFake) UpdateRemote(dir string, url string) error
- func (g *GitFake) Username(dir string) (string, error)
- func (g *GitFake) Version() (string, error)
- type GitHubProvider
- func (p *GitHubProvider) AcceptInvitation(ID int64) (*github.Response, error)
- func (p *GitHubProvider) AddCollaborator(user string, organisation string, repo string) error
- func (p *GitHubProvider) AddPRComment(pr *GitPullRequest, comment string) error
- func (p *GitHubProvider) BranchArchiveURL(org string, name string, branch string) string
- func (p *GitHubProvider) CreateIssue(owner string, repo string, issue *GitIssue) (*GitIssue, error)
- func (p *GitHubProvider) CreateIssueComment(owner string, repo string, number int, comment string) error
- func (p *GitHubProvider) CreatePullRequest(data *GitPullRequestArguments) (*GitPullRequest, error)
- func (p *GitHubProvider) CreateRepository(org string, name string, private bool) (*GitRepository, error)
- func (p *GitHubProvider) CreateWebHook(data *GitWebHookArguments) error
- func (p *GitHubProvider) CurrentUsername() string
- func (p *GitHubProvider) DeleteRepository(org string, name string) error
- func (p *GitHubProvider) ForkRepository(originalOrg string, name string, destinationOrg string) (*GitRepository, error)
- func (p *GitHubProvider) GetEnterpriseApiURL() string
- func (p *GitHubProvider) GetIssue(org string, name string, number int) (*GitIssue, error)
- func (p *GitHubProvider) GetPullRequest(owner string, repo *GitRepositoryInfo, number int) (*GitPullRequest, error)
- func (p *GitHubProvider) GetPullRequestCommits(owner string, repository *GitRepositoryInfo, number int) ([]*GitCommit, error)
- func (p *GitHubProvider) GetRepository(org string, name string) (*GitRepository, error)
- func (p *GitHubProvider) HasIssues() bool
- func (p *GitHubProvider) IsBitbucketCloud() bool
- func (p *GitHubProvider) IsBitbucketServer() bool
- func (p *GitHubProvider) IsGerrit() bool
- func (p *GitHubProvider) IsGitHub() bool
- func (p *GitHubProvider) IsGitea() bool
- func (p *GitHubProvider) IsUserInOrganisation(user string, org string) (bool, error)
- func (p *GitHubProvider) IssueURL(org string, name string, number int, isPull bool) string
- func (p *GitHubProvider) JenkinsWebHookPath(gitURL string, secret string) string
- func (p *GitHubProvider) Kind() string
- func (p *GitHubProvider) Label() string
- func (p *GitHubProvider) ListCommitStatus(org string, repo string, sha string) ([]*GitRepoStatus, error)
- func (p *GitHubProvider) ListInvitations() ([]*github.RepositoryInvitation, *github.Response, error)
- func (p *GitHubProvider) ListOrganisations() ([]GitOrganisation, error)
- func (p *GitHubProvider) ListReleases(org string, name string) ([]*GitRelease, error)
- func (p *GitHubProvider) ListRepositories(org string) ([]*GitRepository, error)
- func (p *GitHubProvider) MergePullRequest(pr *GitPullRequest, message string) error
- func (p *GitHubProvider) PullRequestLastCommitStatus(pr *GitPullRequest) (string, error)
- func (p *GitHubProvider) RenameRepository(org string, name string, newName string) (*GitRepository, error)
- func (p *GitHubProvider) SearchIssues(org string, name string, filter string) ([]*GitIssue, error)
- func (p *GitHubProvider) SearchIssuesClosedSince(org string, name string, t time.Time) ([]*GitIssue, error)
- func (p *GitHubProvider) ServerURL() string
- func (p *GitHubProvider) UpdatePullRequestStatus(pr *GitPullRequest) error
- func (p *GitHubProvider) UpdateRelease(owner string, repo string, tag string, releaseInfo *GitRelease) error
- func (p *GitHubProvider) UserAuth() auth.UserAuth
- func (p *GitHubProvider) UserInfo(username string) *GitUser
- func (p *GitHubProvider) ValidateRepositoryName(org string, name string) error
- type GitIssue
- type GitLabel
- type GitOrganisation
- type GitProvider
- func CreateProvider(server *auth.AuthServer, user *auth.UserAuth, git Gitter) (GitProvider, error)
- func CreateProviderForURL(authConfigSvc auth.AuthConfigService, gitKind string, hostUrl string, ...) (GitProvider, error)
- func NewBitbucketCloudProvider(server *auth.AuthServer, user *auth.UserAuth, git Gitter) (GitProvider, error)
- func NewBitbucketServerProvider(server *auth.AuthServer, user *auth.UserAuth, git Gitter) (GitProvider, error)
- func NewGerritProvider(server *auth.AuthServer, user *auth.UserAuth, git Gitter) (GitProvider, error)
- func NewGitHubProvider(server *auth.AuthServer, user *auth.UserAuth, git Gitter) (GitProvider, error)
- func NewGiteaProvider(server *auth.AuthServer, user *auth.UserAuth, git Gitter) (GitProvider, error)
- func NewGitlabProvider(server *auth.AuthServer, user *auth.UserAuth, git Gitter) (GitProvider, error)
- func WithGitlabClient(server *auth.AuthServer, user *auth.UserAuth, client *gitlab.Client, ...) (GitProvider, error)
- type GitPullRequest
- type GitPullRequestArguments
- type GitRelease
- type GitRemote
- type GitRepoStatus
- type GitRepository
- type GitRepositoryInfo
- func (i *GitRepositoryInfo) CreateProvider(authConfigSvc auth.AuthConfigService, gitKind string, git Gitter) (GitProvider, error)
- func (i *GitRepositoryInfo) CreateProviderForUser(server *auth.AuthServer, user *auth.UserAuth, gitKind string, git Gitter) (GitProvider, error)
- func (i *GitRepositoryInfo) HostURL() string
- func (i *GitRepositoryInfo) HostURLWithoutUser() string
- func (i *GitRepositoryInfo) HttpCloneURL() string
- func (i *GitRepositoryInfo) HttpURL() string
- func (i *GitRepositoryInfo) HttpsURL() string
- func (i *GitRepositoryInfo) IsGitHub() bool
- func (i *GitRepositoryInfo) PickOrCreateProvider(authConfigSvc auth.AuthConfigService, message string, batchMode bool, ...) (GitProvider, error)
- func (i *GitRepositoryInfo) PipelinePath() string
- func (i *GitRepositoryInfo) PullRequestURL(prName string) string
- type GitRepositoryOptions
- type GitTag
- type GitUser
- type GitWebHookArguments
- type GiteaProvider
- func (p *GiteaProvider) AcceptInvitation(ID int64) (*github.Response, error)
- func (p *GiteaProvider) AddCollaborator(user string, organisation string, repo string) error
- func (p *GiteaProvider) AddPRComment(pr *GitPullRequest, comment string) error
- func (p *GiteaProvider) BranchArchiveURL(org string, name string, branch string) string
- func (p *GiteaProvider) CreateIssue(owner string, repo string, issue *GitIssue) (*GitIssue, error)
- func (p *GiteaProvider) CreateIssueComment(owner string, repo string, number int, comment string) error
- func (p *GiteaProvider) CreatePullRequest(data *GitPullRequestArguments) (*GitPullRequest, error)
- func (p *GiteaProvider) CreateRepository(org string, name string, private bool) (*GitRepository, error)
- func (p *GiteaProvider) CreateWebHook(data *GitWebHookArguments) error
- func (p *GiteaProvider) CurrentUsername() string
- func (p *GiteaProvider) DeleteRepository(org string, name string) error
- func (p *GiteaProvider) ForkRepository(originalOrg string, name string, destinationOrg string) (*GitRepository, error)
- func (p *GiteaProvider) GetIssue(org string, name string, number int) (*GitIssue, error)
- func (p *GiteaProvider) GetPullRequest(owner string, repo *GitRepositoryInfo, number int) (*GitPullRequest, error)
- func (p *GiteaProvider) GetPullRequestCommits(owner string, repository *GitRepositoryInfo, number int) ([]*GitCommit, error)
- func (p *GiteaProvider) GetRepository(org string, name string) (*GitRepository, error)
- func (p *GiteaProvider) HasIssues() bool
- func (p *GiteaProvider) IsBitbucketCloud() bool
- func (p *GiteaProvider) IsBitbucketServer() bool
- func (p *GiteaProvider) IsGerrit() bool
- func (p *GiteaProvider) IsGitHub() bool
- func (p *GiteaProvider) IsGitea() bool
- func (p *GiteaProvider) IssueURL(org string, name string, number int, isPull bool) string
- func (p *GiteaProvider) JenkinsWebHookPath(gitURL string, secret string) string
- func (p *GiteaProvider) Kind() string
- func (p *GiteaProvider) Label() string
- func (p *GiteaProvider) ListCommitStatus(org string, repo string, sha string) ([]*GitRepoStatus, error)
- func (p *GiteaProvider) ListInvitations() ([]*github.RepositoryInvitation, *github.Response, error)
- func (p *GiteaProvider) ListOrganisations() ([]GitOrganisation, error)
- func (p *GiteaProvider) ListReleases(org string, name string) ([]*GitRelease, error)
- func (p *GiteaProvider) ListRepositories(org string) ([]*GitRepository, error)
- func (p *GiteaProvider) MergePullRequest(pr *GitPullRequest, message string) error
- func (p *GiteaProvider) PullRequestLastCommitStatus(pr *GitPullRequest) (string, error)
- func (p *GiteaProvider) RenameRepository(org string, name string, newName string) (*GitRepository, error)
- func (p *GiteaProvider) SearchIssues(org string, name string, filter string) ([]*GitIssue, error)
- func (p *GiteaProvider) SearchIssuesClosedSince(org string, name string, t time.Time) ([]*GitIssue, error)
- func (p *GiteaProvider) ServerURL() string
- func (p *GiteaProvider) UpdatePullRequestStatus(pr *GitPullRequest) error
- func (p *GiteaProvider) UpdateRelease(owner string, repo string, tag string, releaseInfo *GitRelease) error
- func (p *GiteaProvider) UserAuth() auth.UserAuth
- func (p *GiteaProvider) UserInfo(username string) *GitUser
- func (p *GiteaProvider) ValidateRepositoryName(org string, name string) error
- type GitlabProvider
- func (p *GitlabProvider) AcceptInvitation(ID int64) (*github.Response, error)
- func (p *GitlabProvider) AddCollaborator(user string, organisation string, repo string) error
- func (g *GitlabProvider) AddPRComment(pr *GitPullRequest, comment string) error
- func (p *GitlabProvider) BranchArchiveURL(org string, name string, branch string) string
- func (g *GitlabProvider) CreateIssue(owner string, repo string, issue *GitIssue) (*GitIssue, error)
- func (g *GitlabProvider) CreateIssueComment(owner string, repo string, number int, comment string) error
- func (g *GitlabProvider) CreatePullRequest(data *GitPullRequestArguments) (*GitPullRequest, error)
- func (g *GitlabProvider) CreateRepository(org string, name string, private bool) (*GitRepository, error)
- func (g *GitlabProvider) CreateWebHook(data *GitWebHookArguments) error
- func (p *GitlabProvider) CurrentUsername() string
- func (g *GitlabProvider) DeleteRepository(org, name string) error
- func (g *GitlabProvider) ForkRepository(originalOrg, name, destinationOrg string) (*GitRepository, error)
- func (g *GitlabProvider) GetIssue(org, repo string, number int) (*GitIssue, error)
- func (p *GitlabProvider) GetPullRequest(owner string, repo *GitRepositoryInfo, number int) (*GitPullRequest, error)
- func (p *GitlabProvider) GetPullRequestCommits(owner string, repository *GitRepositoryInfo, number int) ([]*GitCommit, error)
- func (g *GitlabProvider) GetRepository(org, name string) (*GitRepository, error)
- func (g *GitlabProvider) HasIssues() bool
- func (g *GitlabProvider) IsBitbucketCloud() bool
- func (g *GitlabProvider) IsBitbucketServer() bool
- func (g *GitlabProvider) IsGerrit() bool
- func (g *GitlabProvider) IsGitHub() bool
- func (g *GitlabProvider) IsGitea() bool
- func (p *GitlabProvider) IssueURL(org string, name string, number int, isPull bool) string
- func (g *GitlabProvider) JenkinsWebHookPath(gitURL string, secret string) string
- func (g *GitlabProvider) Kind() string
- func (g *GitlabProvider) Label() string
- func (g *GitlabProvider) ListCommitStatus(org string, repo string, sha string) ([]*GitRepoStatus, error)
- func (p *GitlabProvider) ListInvitations() ([]*github.RepositoryInvitation, *github.Response, error)
- func (g *GitlabProvider) ListOrganisations() ([]GitOrganisation, error)
- func (g *GitlabProvider) ListReleases(org string, name string) ([]*GitRelease, error)
- func (g *GitlabProvider) ListRepositories(org string) ([]*GitRepository, error)
- func (g *GitlabProvider) MergePullRequest(pr *GitPullRequest, message string) error
- func (g *GitlabProvider) PullRequestLastCommitStatus(pr *GitPullRequest) (string, error)
- func (g *GitlabProvider) RenameRepository(org, name, newName string) (*GitRepository, error)
- func (g *GitlabProvider) SearchIssues(org, repo, query string) ([]*GitIssue, error)
- func (g *GitlabProvider) SearchIssuesClosedSince(org string, repo string, t time.Time) ([]*GitIssue, error)
- func (p *GitlabProvider) ServerURL() string
- func (g *GitlabProvider) UpdatePullRequestStatus(pr *GitPullRequest) error
- func (g *GitlabProvider) UpdateRelease(owner string, repo string, tag string, releaseInfo *GitRelease) error
- func (p *GitlabProvider) UserAuth() auth.UserAuth
- func (p *GitlabProvider) UserInfo(username string) *GitUser
- func (g *GitlabProvider) ValidateRepositoryName(org, name string) error
- type Gitter
- type GroupAndCommitInfos
- type OrganisationChecker
- type OrganisationLister
Constants ¶
const ( KindBitBucketCloud = "bitbucketcloud" KindBitBucketServer = "bitbucketserver" KindGitea = "gitea" KindGitlab = "gitlab" KindGitHub = "github" KindUnknown = "unknown" BitbucketCloudURL = "https://bitbucket.org" )
const ( GitHubHost = "github.com" GitHubURL = "https://github.com" )
const ( CommitStatusPending CommitStatus = "pending" CommitSatusSuccess = "success" CommitStatusError = "error" CommitStatusFailure = "failure" )
Variables ¶
var ( // ConventionalCommitTitles textual descriptions for // Conventional Commit types: https://conventionalcommits.org/ ConventionalCommitTitles = map[string]*CommitGroup{ "feat": createCommitGroup("New Features"), "fix": createCommitGroup("Bug Fixes"), "perf": createCommitGroup("Performance Improvements"), "refactor": createCommitGroup("Code Refactoring"), "docs": createCommitGroup("Documentation"), "test": createCommitGroup("Tests"), "revert": createCommitGroup("Reverts"), "style": createCommitGroup("Styles"), "chore": createCommitGroup("Chores"), "": createCommitGroup(""), } )
var (
KindGits = []string{KindBitBucketCloud, KindBitBucketServer, KindGitea, KindGitHub, KindGitlab}
)
Functions ¶
func BitBucketCloudAccessTokenURL ¶ added in v1.2.119
func BitBucketServerAccessTokenURL ¶ added in v1.2.119
func GenerateMarkdown ¶ added in v1.0.100
func GenerateMarkdown(releaseSpec *v1.ReleaseSpec, gitInfo *GitRepositoryInfo) (string, error)
GenerateMarkdown generates the markdown document for the commits
func GetHost ¶ added in v1.1.70
func GetHost(gitProvider GitProvider) (string, error)
GetHost returns the Git Provider hostname, e.g github.com
func GetOrganizations ¶ added in v1.3.176
func GetOrganizations(orgLister OrganisationLister, userName string) []string
GetOrganizations gets the organisation
func GitHubAccessTokenURL ¶ added in v1.0.16
func GitHubEnterpriseApiEndpointURL ¶ added in v1.1.44
func GiteaAccessTokenURL ¶ added in v1.0.16
func GitlabAccessTokenURL ¶ added in v1.2.15
GitlabAccessTokenURL returns the URL to click on to generate a personal access token for the Git provider
func IsGitHubServerURL ¶ added in v1.1.44
func IsGitLabServerURL ¶ added in v1.3.130
func IsGitRepoStatusFailed ¶ added in v1.0.80
func IsGitRepoStatusFailed(statuses ...*GitRepoStatus) bool
IsGitRepoStatusFailed returns true if any of the statuses have failed
func IsGitRepoStatusSuccess ¶ added in v1.0.80
func IsGitRepoStatusSuccess(statuses ...*GitRepoStatus) bool
IsGitRepoStatusSuccess returns true if all the statuses are successful
func PickOrganisation ¶
func PickOrganisation(orgLister OrganisationLister, userName string, in terminal.FileReader, out terminal.FileWriter, errOut io.Writer) (string, error)
PickOrganisation picks an organisations login if there is one available
func ProviderAccessTokenURL ¶ added in v1.0.16
func ReleaseDownloadCount ¶ added in v1.1.67
func ReleaseDownloadCount(releases []*GitRelease) int
ReleaseDownloadCount returns the total number of downloads for the given set of releases
func SaasGitKind ¶ added in v1.1.72
SaasGitKind returns the kind for SaaS Git providers or "" if the URL could not be deduced
Types ¶
type BitbucketCloudProvider ¶ added in v1.1.54
type BitbucketCloudProvider struct { Client *bitbucket.APIClient Username string Context context.Context Server auth.AuthServer User auth.UserAuth Git Gitter }
BitbucketCloudProvider implements GitProvider interface for bitbucket.org
func (*BitbucketCloudProvider) AcceptInvitation ¶ added in v1.3.222
func (b *BitbucketCloudProvider) AcceptInvitation(ID int64) (*github.Response, error)
func (*BitbucketCloudProvider) AddCollaborator ¶ added in v1.3.222
func (b *BitbucketCloudProvider) AddCollaborator(user string, organisation string, repo string) error
func (*BitbucketCloudProvider) AddPRComment ¶ added in v1.1.54
func (b *BitbucketCloudProvider) AddPRComment(pr *GitPullRequest, comment string) error
func (*BitbucketCloudProvider) BranchArchiveURL ¶ added in v1.3.206
func (b *BitbucketCloudProvider) BranchArchiveURL(org string, name string, branch string) string
func (*BitbucketCloudProvider) CreateIssue ¶ added in v1.1.54
func (*BitbucketCloudProvider) CreateIssueComment ¶ added in v1.1.54
func (*BitbucketCloudProvider) CreatePullRequest ¶ added in v1.1.54
func (b *BitbucketCloudProvider) CreatePullRequest( data *GitPullRequestArguments, ) (*GitPullRequest, error)
func (*BitbucketCloudProvider) CreateRepository ¶ added in v1.1.54
func (b *BitbucketCloudProvider) CreateRepository( org string, name string, private bool, ) (*GitRepository, error)
func (*BitbucketCloudProvider) CreateWebHook ¶ added in v1.1.54
func (b *BitbucketCloudProvider) CreateWebHook(data *GitWebHookArguments) error
func (*BitbucketCloudProvider) CurrentUsername ¶ added in v1.2.14
func (p *BitbucketCloudProvider) CurrentUsername() string
func (*BitbucketCloudProvider) DeleteRepository ¶ added in v1.1.54
func (b *BitbucketCloudProvider) DeleteRepository(org string, name string) error
func (*BitbucketCloudProvider) ForkRepository ¶ added in v1.1.54
func (b *BitbucketCloudProvider) ForkRepository( originalOrg string, name string, destinationOrg string, ) (*GitRepository, error)
func (*BitbucketCloudProvider) GetPullRequest ¶ added in v1.2.14
func (p *BitbucketCloudProvider) GetPullRequest(owner string, repoInfo *GitRepositoryInfo, number int) (*GitPullRequest, error)
func (*BitbucketCloudProvider) GetPullRequestCommits ¶ added in v1.2.63
func (b *BitbucketCloudProvider) GetPullRequestCommits(owner string, repository *GitRepositoryInfo, number int) ([]*GitCommit, error)
func (*BitbucketCloudProvider) GetRepository ¶ added in v1.1.54
func (b *BitbucketCloudProvider) GetRepository( org string, name string, ) (*GitRepository, error)
func (*BitbucketCloudProvider) GitIssueToBitbucketIssue ¶ added in v1.1.57
func (b *BitbucketCloudProvider) GitIssueToBitbucketIssue(gIssue GitIssue) bitbucket.Issue
func (*BitbucketCloudProvider) HasIssues ¶ added in v1.1.54
func (b *BitbucketCloudProvider) HasIssues() bool
func (*BitbucketCloudProvider) IsBitbucketCloud ¶ added in v1.2.119
func (b *BitbucketCloudProvider) IsBitbucketCloud() bool
func (*BitbucketCloudProvider) IsBitbucketServer ¶ added in v1.2.119
func (b *BitbucketCloudProvider) IsBitbucketServer() bool
func (*BitbucketCloudProvider) IsGerrit ¶ added in v1.3.70
func (b *BitbucketCloudProvider) IsGerrit() bool
func (*BitbucketCloudProvider) IsGitHub ¶ added in v1.1.54
func (b *BitbucketCloudProvider) IsGitHub() bool
func (*BitbucketCloudProvider) IsGitea ¶ added in v1.1.54
func (b *BitbucketCloudProvider) IsGitea() bool
func (*BitbucketCloudProvider) JenkinsWebHookPath ¶ added in v1.1.54
func (b *BitbucketCloudProvider) JenkinsWebHookPath(gitURL string, secret string) string
Exposed by Jenkins plugin; this one is for https://wiki.jenkins.io/display/JENKINS/BitBucket+Plugin
func (*BitbucketCloudProvider) Kind ¶ added in v1.1.54
func (b *BitbucketCloudProvider) Kind() string
func (*BitbucketCloudProvider) Label ¶ added in v1.1.54
func (b *BitbucketCloudProvider) Label() string
func (*BitbucketCloudProvider) ListCommitStatus ¶ added in v1.1.54
func (b *BitbucketCloudProvider) ListCommitStatus(org string, repo string, sha string) ([]*GitRepoStatus, error)
func (*BitbucketCloudProvider) ListInvitations ¶ added in v1.3.222
func (b *BitbucketCloudProvider) ListInvitations() ([]*github.RepositoryInvitation, *github.Response, error)
func (*BitbucketCloudProvider) ListOrganisations ¶ added in v1.1.54
func (b *BitbucketCloudProvider) ListOrganisations() ([]GitOrganisation, error)
func (*BitbucketCloudProvider) ListReleases ¶ added in v1.1.67
func (p *BitbucketCloudProvider) ListReleases(org string, name string) ([]*GitRelease, error)
func (*BitbucketCloudProvider) ListRepositories ¶ added in v1.1.54
func (b *BitbucketCloudProvider) ListRepositories(org string) ([]*GitRepository, error)
func (*BitbucketCloudProvider) MergePullRequest ¶ added in v1.1.54
func (b *BitbucketCloudProvider) MergePullRequest(pr *GitPullRequest, message string) error
func (*BitbucketCloudProvider) PullRequestLastCommitStatus ¶ added in v1.1.54
func (b *BitbucketCloudProvider) PullRequestLastCommitStatus(pr *GitPullRequest) (string, error)
func (*BitbucketCloudProvider) RenameRepository ¶ added in v1.1.54
func (b *BitbucketCloudProvider) RenameRepository( org string, name string, newName string, ) (*GitRepository, error)
func (*BitbucketCloudProvider) SearchIssues ¶ added in v1.1.54
func (*BitbucketCloudProvider) SearchIssuesClosedSince ¶ added in v1.1.67
func (*BitbucketCloudProvider) ServerURL ¶ added in v1.1.54
func (b *BitbucketCloudProvider) ServerURL() string
func (*BitbucketCloudProvider) UpdatePullRequestStatus ¶ added in v1.1.54
func (b *BitbucketCloudProvider) UpdatePullRequestStatus(pr *GitPullRequest) error
func (*BitbucketCloudProvider) UpdateRelease ¶ added in v1.1.54
func (b *BitbucketCloudProvider) UpdateRelease(owner string, repo string, tag string, releaseInfo *GitRelease) error
func (*BitbucketCloudProvider) UserAuth ¶ added in v1.2.62
func (p *BitbucketCloudProvider) UserAuth() auth.UserAuth
func (*BitbucketCloudProvider) UserInfo ¶ added in v1.2.14
func (p *BitbucketCloudProvider) UserInfo(username string) *GitUser
func (*BitbucketCloudProvider) ValidateRepositoryName ¶ added in v1.1.54
func (b *BitbucketCloudProvider) ValidateRepositoryName(org string, name string) error
type BitbucketServerProvider ¶ added in v1.2.119
type BitbucketServerProvider struct { Client *bitbucket.APIClient Username string Context context.Context Server auth.AuthServer User auth.UserAuth Git Gitter }
BitbucketServerProvider implements GitProvider interface for a bitbucket server
func (*BitbucketServerProvider) AcceptInvitation ¶ added in v1.3.222
func (b *BitbucketServerProvider) AcceptInvitation(ID int64) (*github.Response, error)
func (*BitbucketServerProvider) AddCollaborator ¶ added in v1.3.222
func (b *BitbucketServerProvider) AddCollaborator(user string, organisation string, repo string) error
func (*BitbucketServerProvider) AddPRComment ¶ added in v1.2.119
func (b *BitbucketServerProvider) AddPRComment(pr *GitPullRequest, comment string) error
func (*BitbucketServerProvider) BranchArchiveURL ¶ added in v1.3.206
func (b *BitbucketServerProvider) BranchArchiveURL(org string, name string, branch string) string
func (*BitbucketServerProvider) CreateIssue ¶ added in v1.2.119
func (*BitbucketServerProvider) CreateIssueComment ¶ added in v1.2.119
func (*BitbucketServerProvider) CreatePullRequest ¶ added in v1.2.119
func (b *BitbucketServerProvider) CreatePullRequest(data *GitPullRequestArguments) (*GitPullRequest, error)
func (*BitbucketServerProvider) CreateRepository ¶ added in v1.2.119
func (b *BitbucketServerProvider) CreateRepository(org, name string, private bool) (*GitRepository, error)
func (*BitbucketServerProvider) CreateWebHook ¶ added in v1.2.119
func (b *BitbucketServerProvider) CreateWebHook(data *GitWebHookArguments) error
func (*BitbucketServerProvider) CurrentUsername ¶ added in v1.2.119
func (b *BitbucketServerProvider) CurrentUsername() string
func (*BitbucketServerProvider) DeleteRepository ¶ added in v1.2.119
func (b *BitbucketServerProvider) DeleteRepository(org, name string) error
func (*BitbucketServerProvider) ForkRepository ¶ added in v1.2.119
func (b *BitbucketServerProvider) ForkRepository(originalOrg, name, destinationOrg string) (*GitRepository, error)
func (*BitbucketServerProvider) GetPullRequest ¶ added in v1.2.119
func (b *BitbucketServerProvider) GetPullRequest(owner string, repo *GitRepositoryInfo, number int) (*GitPullRequest, error)
func (*BitbucketServerProvider) GetPullRequestCommits ¶ added in v1.2.119
func (b *BitbucketServerProvider) GetPullRequestCommits(owner string, repository *GitRepositoryInfo, number int) ([]*GitCommit, error)
func (*BitbucketServerProvider) GetRepository ¶ added in v1.2.119
func (b *BitbucketServerProvider) GetRepository(org string, name string) (*GitRepository, error)
func (*BitbucketServerProvider) HasIssues ¶ added in v1.2.119
func (b *BitbucketServerProvider) HasIssues() bool
func (*BitbucketServerProvider) IsBitbucketCloud ¶ added in v1.2.119
func (b *BitbucketServerProvider) IsBitbucketCloud() bool
func (*BitbucketServerProvider) IsBitbucketServer ¶ added in v1.2.119
func (b *BitbucketServerProvider) IsBitbucketServer() bool
func (*BitbucketServerProvider) IsGerrit ¶ added in v1.3.70
func (b *BitbucketServerProvider) IsGerrit() bool
func (*BitbucketServerProvider) IsGitHub ¶ added in v1.2.119
func (b *BitbucketServerProvider) IsGitHub() bool
func (*BitbucketServerProvider) IsGitea ¶ added in v1.2.119
func (b *BitbucketServerProvider) IsGitea() bool
func (*BitbucketServerProvider) JenkinsWebHookPath ¶ added in v1.2.119
func (b *BitbucketServerProvider) JenkinsWebHookPath(gitURL string, secret string) string
Exposed by Jenkins plugin; this one is for https://wiki.jenkins.io/display/JENKINS/BitBucket+Plugin
func (*BitbucketServerProvider) Kind ¶ added in v1.2.119
func (b *BitbucketServerProvider) Kind() string
func (*BitbucketServerProvider) Label ¶ added in v1.2.119
func (b *BitbucketServerProvider) Label() string
func (*BitbucketServerProvider) ListCommitStatus ¶ added in v1.2.119
func (b *BitbucketServerProvider) ListCommitStatus(org, repo, sha string) ([]*GitRepoStatus, error)
func (*BitbucketServerProvider) ListInvitations ¶ added in v1.3.222
func (b *BitbucketServerProvider) ListInvitations() ([]*github.RepositoryInvitation, *github.Response, error)
func (*BitbucketServerProvider) ListOrganisations ¶ added in v1.2.119
func (b *BitbucketServerProvider) ListOrganisations() ([]GitOrganisation, error)
func (*BitbucketServerProvider) ListReleases ¶ added in v1.2.119
func (b *BitbucketServerProvider) ListReleases(org string, name string) ([]*GitRelease, error)
func (*BitbucketServerProvider) ListRepositories ¶ added in v1.2.119
func (b *BitbucketServerProvider) ListRepositories(org string) ([]*GitRepository, error)
func (*BitbucketServerProvider) MergePullRequest ¶ added in v1.2.119
func (b *BitbucketServerProvider) MergePullRequest(pr *GitPullRequest, message string) error
func (*BitbucketServerProvider) PullRequestLastCommitStatus ¶ added in v1.2.119
func (b *BitbucketServerProvider) PullRequestLastCommitStatus(pr *GitPullRequest) (string, error)
func (*BitbucketServerProvider) RenameRepository ¶ added in v1.2.119
func (b *BitbucketServerProvider) RenameRepository(org, name, newName string) (*GitRepository, error)
func (*BitbucketServerProvider) SearchIssues ¶ added in v1.2.119
func (*BitbucketServerProvider) SearchIssuesClosedSince ¶ added in v1.2.119
func (*BitbucketServerProvider) ServerURL ¶ added in v1.2.119
func (b *BitbucketServerProvider) ServerURL() string
func (*BitbucketServerProvider) UpdatePullRequestStatus ¶ added in v1.2.119
func (b *BitbucketServerProvider) UpdatePullRequestStatus(pr *GitPullRequest) error
func (*BitbucketServerProvider) UpdateRelease ¶ added in v1.2.119
func (b *BitbucketServerProvider) UpdateRelease(owner string, repo string, tag string, releaseInfo *GitRelease) error
func (*BitbucketServerProvider) UserAuth ¶ added in v1.2.119
func (b *BitbucketServerProvider) UserAuth() auth.UserAuth
func (*BitbucketServerProvider) UserInfo ¶ added in v1.2.119
func (b *BitbucketServerProvider) UserInfo(username string) *GitUser
func (*BitbucketServerProvider) ValidateRepositoryName ¶ added in v1.2.119
func (b *BitbucketServerProvider) ValidateRepositoryName(org, name string) error
type CommitGroup ¶ added in v1.0.100
func ConventionalCommitTypeToTitle ¶ added in v1.0.99
func ConventionalCommitTypeToTitle(kind string) *CommitGroup
ConventionalCommitTypeToTitle returns the title of the conventional commit type see: https://conventionalcommits.org/
type CommitInfo ¶ added in v1.0.99
type CommitInfo struct { Kind string Feature string Message string // contains filtered or unexported fields }
func ParseCommit ¶ added in v1.0.99
func ParseCommit(message string) *CommitInfo
ParseCommit parses a conventional commit see: https://conventionalcommits.org/
func (*CommitInfo) Group ¶ added in v1.0.100
func (c *CommitInfo) Group() *CommitGroup
func (*CommitInfo) Order ¶ added in v1.0.100
func (c *CommitInfo) Order() int
func (*CommitInfo) Title ¶ added in v1.0.99
func (c *CommitInfo) Title() string
type CommitStatus ¶ added in v1.3.47
type CommitStatus string
type CreateRepoData ¶
type CreateRepoData struct { Organisation string RepoName string FullName string PrivateRepo bool User *auth.UserAuth GitProvider GitProvider }
func PickNewGitRepository ¶
func PickNewGitRepository(batchMode bool, authConfigSvc auth.AuthConfigService, defaultRepoName string, repoOptions *GitRepositoryOptions, server *auth.AuthServer, userAuth *auth.UserAuth, git Gitter, in terminal.FileReader, out terminal.FileWriter, outErr io.Writer) (*CreateRepoData, error)
func PickNewOrExistingGitRepository ¶ added in v1.3.109
func PickNewOrExistingGitRepository(batchMode bool, authConfigSvc auth.AuthConfigService, defaultRepoName string, repoOptions *GitRepositoryOptions, server *auth.AuthServer, userAuth *auth.UserAuth, git Gitter, allowExistingRepo bool, in terminal.FileReader, out terminal.FileWriter, errOut io.Writer) (*CreateRepoData, error)
func (*CreateRepoData) CreateRepository ¶
func (d *CreateRepoData) CreateRepository() (*GitRepository, error)
CreateRepository creates the repository - failing if it already exists
func (*CreateRepoData) GetRepository ¶ added in v1.0.82
func (d *CreateRepoData) GetRepository() (*GitRepository, error)
GetRepository returns the repository if it already exists
type FakeCommit ¶ added in v1.3.47
type FakeCommit struct { Commit *GitCommit Status CommitStatus }
type FakeProvider ¶ added in v1.3.47
type FakeProvider struct { Server auth.AuthServer User auth.UserAuth Organizations []GitOrganisation Repositories map[string][]*FakeRepository ForkedRepositories map[string][]*FakeRepository Type FakeProviderType Users []*GitUser }
func NewFakeProvider ¶ added in v1.3.169
func NewFakeProvider(repositories ...*FakeRepository) *FakeProvider
NewFakeRepository creates a new fake repository
func (*FakeProvider) AcceptInvitation ¶ added in v1.3.222
func (f *FakeProvider) AcceptInvitation(ID int64) (*github.Response, error)
func (*FakeProvider) AddCollaborator ¶ added in v1.3.222
func (f *FakeProvider) AddCollaborator(user string, organisation string, repo string) error
func (*FakeProvider) AddPRComment ¶ added in v1.3.47
func (f *FakeProvider) AddPRComment(pr *GitPullRequest, comment string) error
func (*FakeProvider) BranchArchiveURL ¶ added in v1.3.206
func (f *FakeProvider) BranchArchiveURL(org string, name string, branch string) string
func (*FakeProvider) CreateIssue ¶ added in v1.3.47
func (*FakeProvider) CreateIssueComment ¶ added in v1.3.47
func (*FakeProvider) CreatePullRequest ¶ added in v1.3.47
func (f *FakeProvider) CreatePullRequest(data *GitPullRequestArguments) (*GitPullRequest, error)
func (*FakeProvider) CreateRepository ¶ added in v1.3.47
func (f *FakeProvider) CreateRepository(org string, name string, private bool) (*GitRepository, error)
func (*FakeProvider) CreateWebHook ¶ added in v1.3.47
func (f *FakeProvider) CreateWebHook(data *GitWebHookArguments) error
func (*FakeProvider) CurrentUsername ¶ added in v1.3.47
func (f *FakeProvider) CurrentUsername() string
func (*FakeProvider) DeleteRepository ¶ added in v1.3.47
func (f *FakeProvider) DeleteRepository(org string, name string) error
func (*FakeProvider) ForkRepository ¶ added in v1.3.47
func (f *FakeProvider) ForkRepository(originalOrg string, name string, destinationOrg string) (*GitRepository, error)
func (*FakeProvider) GetPullRequest ¶ added in v1.3.47
func (f *FakeProvider) GetPullRequest(owner string, repo *GitRepositoryInfo, number int) (*GitPullRequest, error)
func (*FakeProvider) GetPullRequestCommits ¶ added in v1.3.47
func (f *FakeProvider) GetPullRequestCommits(owner string, repo *GitRepositoryInfo, number int) ([]*GitCommit, error)
func (*FakeProvider) GetRepository ¶ added in v1.3.47
func (f *FakeProvider) GetRepository(org string, name string) (*GitRepository, error)
func (*FakeProvider) HasIssues ¶ added in v1.3.47
func (f *FakeProvider) HasIssues() bool
func (*FakeProvider) IsBitbucketCloud ¶ added in v1.3.47
func (f *FakeProvider) IsBitbucketCloud() bool
func (*FakeProvider) IsBitbucketServer ¶ added in v1.3.47
func (f *FakeProvider) IsBitbucketServer() bool
func (*FakeProvider) IsGerrit ¶ added in v1.3.169
func (f *FakeProvider) IsGerrit() bool
func (*FakeProvider) IsGitHub ¶ added in v1.3.47
func (f *FakeProvider) IsGitHub() bool
func (*FakeProvider) IsGitea ¶ added in v1.3.47
func (f *FakeProvider) IsGitea() bool
func (*FakeProvider) JenkinsWebHookPath ¶ added in v1.3.47
func (f *FakeProvider) JenkinsWebHookPath(gitURL string, secret string) string
func (*FakeProvider) Kind ¶ added in v1.3.47
func (f *FakeProvider) Kind() string
func (*FakeProvider) Label ¶ added in v1.3.47
func (f *FakeProvider) Label() string
func (*FakeProvider) ListCommitStatus ¶ added in v1.3.47
func (f *FakeProvider) ListCommitStatus(org string, repoName string, sha string) ([]*GitRepoStatus, error)
func (*FakeProvider) ListInvitations ¶ added in v1.3.222
func (f *FakeProvider) ListInvitations() ([]*github.RepositoryInvitation, *github.Response, error)
func (*FakeProvider) ListOrganisations ¶ added in v1.3.47
func (f *FakeProvider) ListOrganisations() ([]GitOrganisation, error)
func (*FakeProvider) ListReleases ¶ added in v1.3.47
func (f *FakeProvider) ListReleases(org string, name string) ([]*GitRelease, error)
func (*FakeProvider) ListRepositories ¶ added in v1.3.47
func (f *FakeProvider) ListRepositories(org string) ([]*GitRepository, error)
func (*FakeProvider) MergePullRequest ¶ added in v1.3.47
func (f *FakeProvider) MergePullRequest(pr *GitPullRequest, message string) error
func (*FakeProvider) PullRequestLastCommitStatus ¶ added in v1.3.47
func (f *FakeProvider) PullRequestLastCommitStatus(pr *GitPullRequest) (string, error)
func (*FakeProvider) RenameRepository ¶ added in v1.3.47
func (f *FakeProvider) RenameRepository(org string, name string, newName string) (*GitRepository, error)
func (*FakeProvider) SearchIssues ¶ added in v1.3.47
func (*FakeProvider) SearchIssuesClosedSince ¶ added in v1.3.47
func (*FakeProvider) ServerURL ¶ added in v1.3.47
func (f *FakeProvider) ServerURL() string
func (*FakeProvider) UpdatePullRequestStatus ¶ added in v1.3.47
func (f *FakeProvider) UpdatePullRequestStatus(pr *GitPullRequest) error
func (*FakeProvider) UpdateRelease ¶ added in v1.3.47
func (f *FakeProvider) UpdateRelease(owner string, repoName string, tag string, releaseInfo *GitRelease) error
func (*FakeProvider) UserAuth ¶ added in v1.3.47
func (f *FakeProvider) UserAuth() auth.UserAuth
func (*FakeProvider) UserInfo ¶ added in v1.3.47
func (f *FakeProvider) UserInfo(username string) *GitUser
func (*FakeProvider) ValidateRepositoryName ¶ added in v1.3.47
func (f *FakeProvider) ValidateRepositoryName(org string, name string) error
type FakeProviderType ¶ added in v1.3.47
type FakeProviderType int
const ( GitHub FakeProviderType = iota Gitlab Gitea BitbucketCloud BitbucketServer Gerrit )
type FakePullRequest ¶ added in v1.3.47
type FakePullRequest struct { PullRequest *GitPullRequest Commits []*FakeCommit Comment string }
type FakeRepository ¶ added in v1.3.47
type FakeRepository struct { Owner string GitRepo *GitRepository PullRequests map[int]*FakePullRequest Issues map[int]*FakeIssue Commits []*FakeCommit Releases map[string]*GitRelease PullRequestCounter int // contains filtered or unexported fields }
func NewFakeRepository ¶ added in v1.3.169
func NewFakeRepository(owner string, repoName string) *FakeRepository
NewFakeRepository creates a new fake repository
func (*FakeRepository) Name ¶ added in v1.3.169
func (r *FakeRepository) Name() string
func (*FakeRepository) String ¶ added in v1.3.169
func (r *FakeRepository) String() string
type GerritProvider ¶ added in v1.3.70
type GerritProvider struct { Client *gerrit.Client Username string Context context.Context Server auth.AuthServer User auth.UserAuth Git Gitter }
func (*GerritProvider) AcceptInvitation ¶ added in v1.3.222
func (p *GerritProvider) AcceptInvitation(ID int64) (*github.Response, error)
func (*GerritProvider) AddCollaborator ¶ added in v1.3.222
func (p *GerritProvider) AddCollaborator(user string, organisation string, repo string) error
func (*GerritProvider) AddPRComment ¶ added in v1.3.70
func (p *GerritProvider) AddPRComment(pr *GitPullRequest, comment string) error
func (*GerritProvider) BranchArchiveURL ¶ added in v1.3.206
func (p *GerritProvider) BranchArchiveURL(org string, name string, branch string) string
func (*GerritProvider) CreateIssue ¶ added in v1.3.70
func (*GerritProvider) CreateIssueComment ¶ added in v1.3.70
func (*GerritProvider) CreatePullRequest ¶ added in v1.3.70
func (p *GerritProvider) CreatePullRequest(data *GitPullRequestArguments) (*GitPullRequest, error)
func (*GerritProvider) CreateRepository ¶ added in v1.3.70
func (p *GerritProvider) CreateRepository(org string, name string, private bool) (*GitRepository, error)
func (*GerritProvider) CreateWebHook ¶ added in v1.3.70
func (p *GerritProvider) CreateWebHook(data *GitWebHookArguments) error
func (*GerritProvider) CurrentUsername ¶ added in v1.3.70
func (p *GerritProvider) CurrentUsername() string
func (*GerritProvider) DeleteRepository ¶ added in v1.3.70
func (p *GerritProvider) DeleteRepository(org string, name string) error
func (*GerritProvider) ForkRepository ¶ added in v1.3.70
func (p *GerritProvider) ForkRepository(originalOrg string, name string, destinationOrg string) (*GitRepository, error)
func (*GerritProvider) GetPullRequest ¶ added in v1.3.70
func (p *GerritProvider) GetPullRequest(owner string, repo *GitRepositoryInfo, number int) (*GitPullRequest, error)
func (*GerritProvider) GetPullRequestCommits ¶ added in v1.3.70
func (p *GerritProvider) GetPullRequestCommits(owner string, repo *GitRepositoryInfo, number int) ([]*GitCommit, error)
func (*GerritProvider) GetRepository ¶ added in v1.3.70
func (p *GerritProvider) GetRepository(org string, name string) (*GitRepository, error)
func (*GerritProvider) HasIssues ¶ added in v1.3.70
func (p *GerritProvider) HasIssues() bool
func (*GerritProvider) IsBitbucketCloud ¶ added in v1.3.70
func (p *GerritProvider) IsBitbucketCloud() bool
func (*GerritProvider) IsBitbucketServer ¶ added in v1.3.70
func (p *GerritProvider) IsBitbucketServer() bool
func (*GerritProvider) IsGerrit ¶ added in v1.3.70
func (p *GerritProvider) IsGerrit() bool
func (*GerritProvider) IsGitHub ¶ added in v1.3.70
func (p *GerritProvider) IsGitHub() bool
func (*GerritProvider) IsGitea ¶ added in v1.3.70
func (p *GerritProvider) IsGitea() bool
func (*GerritProvider) JenkinsWebHookPath ¶ added in v1.3.70
func (p *GerritProvider) JenkinsWebHookPath(gitURL string, secret string) string
func (*GerritProvider) Kind ¶ added in v1.3.70
func (p *GerritProvider) Kind() string
func (*GerritProvider) Label ¶ added in v1.3.70
func (p *GerritProvider) Label() string
func (*GerritProvider) ListCommitStatus ¶ added in v1.3.70
func (p *GerritProvider) ListCommitStatus(org string, repo string, sha string) ([]*GitRepoStatus, error)
func (*GerritProvider) ListInvitations ¶ added in v1.3.222
func (p *GerritProvider) ListInvitations() ([]*github.RepositoryInvitation, *github.Response, error)
func (*GerritProvider) ListReleases ¶ added in v1.3.70
func (p *GerritProvider) ListReleases(org string, name string) ([]*GitRelease, error)
func (*GerritProvider) ListRepositories ¶ added in v1.3.70
func (p *GerritProvider) ListRepositories(org string) ([]*GitRepository, error)
func (*GerritProvider) MergePullRequest ¶ added in v1.3.70
func (p *GerritProvider) MergePullRequest(pr *GitPullRequest, message string) error
func (*GerritProvider) PullRequestLastCommitStatus ¶ added in v1.3.70
func (p *GerritProvider) PullRequestLastCommitStatus(pr *GitPullRequest) (string, error)
func (*GerritProvider) RenameRepository ¶ added in v1.3.70
func (p *GerritProvider) RenameRepository(org string, name string, newName string) (*GitRepository, error)
func (*GerritProvider) SearchIssues ¶ added in v1.3.70
func (*GerritProvider) SearchIssuesClosedSince ¶ added in v1.3.70
func (*GerritProvider) ServerURL ¶ added in v1.3.70
func (p *GerritProvider) ServerURL() string
func (*GerritProvider) UpdatePullRequestStatus ¶ added in v1.3.70
func (p *GerritProvider) UpdatePullRequestStatus(pr *GitPullRequest) error
func (*GerritProvider) UpdateRelease ¶ added in v1.3.70
func (p *GerritProvider) UpdateRelease(owner string, repo string, tag string, releaseInfo *GitRelease) error
func (*GerritProvider) UserAuth ¶ added in v1.3.70
func (p *GerritProvider) UserAuth() auth.UserAuth
func (*GerritProvider) UserInfo ¶ added in v1.3.70
func (p *GerritProvider) UserInfo(username string) *GitUser
func (*GerritProvider) ValidateRepositoryName ¶ added in v1.3.70
func (p *GerritProvider) ValidateRepositoryName(org string, name string) error
type GitCLI ¶ added in v1.3.30
type GitCLI struct{}
GitCLI implements common git actions based on git CLI
func (*GitCLI) AddCommmit ¶ added in v1.3.30
AddCommit perform an add and commit of the changes from the repository at the given directory with the given messages
func (*GitCLI) AddRemote ¶ added in v1.3.30
AddRemote adds a remote repository at the given URL and with the given name
func (*GitCLI) Branch ¶ added in v1.3.30
Branch returns the current branch of the repository located at the given directory
func (*GitCLI) CheckoutRemoteBranch ¶ added in v1.3.30
CheckoutRemoteBranch checks out the given remote tracking branch
func (*GitCLI) CloneOrPull ¶ added in v1.3.30
CloneOrPull clones the given git URL or pull if it already exists
func (*GitCLI) CommitIfChanges ¶ added in v1.3.30
CommiIfChanges does a commit if there are any changes in the repository at the given directory
func (*GitCLI) ConvertToValidBranchName ¶ added in v1.3.30
ConvertToValidBranchName converts the given branch name into a valid git branch string replacing any dodgy characters
func (*GitCLI) CreateBranch ¶ added in v1.3.30
CreateBranch creates a branch with the given name in the Git repository from the given directory
func (*GitCLI) CreatePushURL ¶ added in v1.3.30
CreatePushURL creates the Git repository URL with the username and password encoded for HTTPS based URLs
func (*GitCLI) CreateTag ¶ added in v1.3.30
CreateTag creates a tag with the given name and message in the repository at the given directory
func (*GitCLI) DeleteRemoteBranch ¶ added in v1.3.341
DeleteRemoteBranch deletes the remote branch in the given given directory
func (*GitCLI) DiscoverRemoteGitURL ¶ added in v1.3.30
DiscoverRemoteGitURL discovers the remote git URL from the given git configuration
func (*GitCLI) DiscoverUpstreamGitURL ¶ added in v1.3.30
DiscoverUpstreamGitURL discovers the upstream git URL from the given git configuration
func (*GitCLI) FindGitConfigDir ¶ added in v1.3.30
FindGitConfigDir tries to find the `.git` directory either in the current directory or in parent directories
func (*GitCLI) ForcePushBranch ¶ added in v1.3.30
ForcePushBranch does a force push of the local branch into the remote branch of the repository at the given directory
func (*GitCLI) GetAuthorEmailForCommit ¶ added in v1.3.30
GetAuthorEmailForCommit returns the author email from commit message with the given SHA
func (*GitCLI) GetCurrentGitTagSHA ¶ added in v1.3.30
GetCurrentGitTagSHA return the SHA of the current git tag from the repository at the given directory
func (*GitCLI) GetPreviousGitTagSHA ¶ added in v1.3.30
GetPreviousGitTagSHA returns the previous git tag from the repository at the given directory
func (*GitCLI) GetRemoteUrl ¶ added in v1.3.30
GetRemoteUrl returns the remote URL from the given git config
func (*GitCLI) GetRevisionBeforeDate ¶ added in v1.3.30
GetRevisionBeforeDate returns the revision before the given date
func (*GitCLI) GetRevisionBeforeDateText ¶ added in v1.3.30
GetRevisionBeforeDateText returns the revision before the given date in format "MonthName dayNumber year"
func (*GitCLI) HasChanges ¶ added in v1.3.30
HasChanges indicates if there are any changes in the repository from the given directory
func (*GitCLI) Info ¶ added in v1.3.30
func (g *GitCLI) Info(dir string) (*GitRepositoryInfo, error)
Info returns the git info of the repository at the given directory
func (*GitCLI) IsFork ¶ added in v1.3.30
func (g *GitCLI) IsFork(gitProvider GitProvider, gitInfo *GitRepositoryInfo, dir string) (bool, error)
IsFork indicates if the repository at the given directory is a fork
func (*GitCLI) PrintCreateRepositoryGenerateAccessToken ¶ added in v1.3.30
func (g *GitCLI) PrintCreateRepositoryGenerateAccessToken(server *auth.AuthServer, username string, o io.Writer)
PrintCreateRepositoryGenerateAccessToken prints the access token URL of a Git repository
func (*GitCLI) PullRemoteBranches ¶ added in v1.3.341
PullRemoteBranches pulls the remote Git tags from the given given directory
func (*GitCLI) PullUpstream ¶ added in v1.3.30
PullUpstream pulls the remote upstream branch into master branch into the given directory
func (*GitCLI) Push ¶ added in v1.3.30
Push pushes the changes from the repository at the given directory
func (*GitCLI) PushMaster ¶ added in v1.3.30
PushMaster pushes the master branch into the origin
func (*GitCLI) RemoteBranchNames ¶ added in v1.3.30
RemoteBranches returns all remote branches with the given prefix
func (*GitCLI) RemoteBranches ¶ added in v1.3.30
RemoteBranches returns the remote branches
func (*GitCLI) Remove ¶ added in v1.3.30
Remove removes the given file from a Git repository located at the given directory
func (*GitCLI) RepoName ¶ added in v1.3.30
RepoName formats the repository names based on the organization
func (*GitCLI) Server ¶ added in v1.3.30
Server returns the Git server of the repository at the given directory
func (*GitCLI) SetRemoteURL ¶ added in v1.3.30
SetRemoteURL sets the remote URL of the remote with the given name
func (*GitCLI) SetUsername ¶ added in v1.3.30
SetUsername sets the username in the git configuration
func (*GitCLI) Status ¶ added in v1.3.30
Status returns the status of the Git repository at the given directory
func (*GitCLI) Tags ¶ added in v1.3.30
Tags returns all tags from the repository at the given directory
func (*GitCLI) ToGitLabels ¶ added in v1.3.30
ToGitLabels converts the list of label names into an array of GitLabels
func (*GitCLI) UpdateRemote ¶ added in v1.3.30
UpdateRemote updates the URL of the remote repository
type GitFake ¶ added in v1.3.33
type GitFake struct { Remotes []GitRemote Branches []string BranchesRemote []string CurrentBranch string AccessTokenURL string RepoInfo GitRepositoryInfo Fork bool GitVersion string UserInfo GitUser Commits []GitCommit Changes bool GitTags []GitTag Revision string }
func (*GitFake) AddCommmit ¶ added in v1.3.33
func (*GitFake) CheckoutRemoteBranch ¶ added in v1.3.33
func (*GitFake) CloneOrPull ¶ added in v1.3.33
func (*GitFake) CommitIfChanges ¶ added in v1.3.33
func (*GitFake) ConvertToValidBranchName ¶ added in v1.3.33
func (*GitFake) CreateBranch ¶ added in v1.3.33
func (*GitFake) CreatePushURL ¶ added in v1.3.33
func (*GitFake) DeleteRemoteBranch ¶ added in v1.3.341
func (*GitFake) DiscoverRemoteGitURL ¶ added in v1.3.33
func (*GitFake) DiscoverUpstreamGitURL ¶ added in v1.3.33
func (*GitFake) FindGitConfigDir ¶ added in v1.3.33
func (*GitFake) ForcePushBranch ¶ added in v1.3.33
func (*GitFake) GetAuthorEmailForCommit ¶ added in v1.3.33
func (*GitFake) GetCurrentGitTagSHA ¶ added in v1.3.33
func (*GitFake) GetPreviousGitTagSHA ¶ added in v1.3.33
func (*GitFake) GetRemoteUrl ¶ added in v1.3.33
func (*GitFake) GetRevisionBeforeDate ¶ added in v1.3.33
func (*GitFake) GetRevisionBeforeDateText ¶ added in v1.3.33
func (*GitFake) HasChanges ¶ added in v1.3.33
func (*GitFake) Info ¶ added in v1.3.33
func (g *GitFake) Info(dir string) (*GitRepositoryInfo, error)
func (*GitFake) IsFork ¶ added in v1.3.33
func (g *GitFake) IsFork(gitProvider GitProvider, gitInfo *GitRepositoryInfo, dir string) (bool, error)
func (*GitFake) PrintCreateRepositoryGenerateAccessToken ¶ added in v1.3.33
func (*GitFake) PullRemoteBranches ¶ added in v1.3.341
func (*GitFake) PullUpstream ¶ added in v1.3.33
func (*GitFake) PushMaster ¶ added in v1.3.33
func (*GitFake) RemoteBranchNames ¶ added in v1.3.33
func (*GitFake) RemoteBranches ¶ added in v1.3.33
func (*GitFake) SetRemoteURL ¶ added in v1.3.33
func (*GitFake) SetUsername ¶ added in v1.3.33
func (*GitFake) ToGitLabels ¶ added in v1.3.33
func (*GitFake) UpdateRemote ¶ added in v1.3.33
type GitHubProvider ¶
type GitHubProvider struct { Username string Client *github.Client Context context.Context Server auth.AuthServer User auth.UserAuth Git Gitter }
func (*GitHubProvider) AcceptInvitation ¶ added in v1.3.222
func (p *GitHubProvider) AcceptInvitation(ID int64) (*github.Response, error)
func (*GitHubProvider) AddCollaborator ¶ added in v1.3.222
func (p *GitHubProvider) AddCollaborator(user string, organisation string, repo string) error
func (*GitHubProvider) AddPRComment ¶ added in v1.0.91
func (p *GitHubProvider) AddPRComment(pr *GitPullRequest, comment string) error
func (*GitHubProvider) BranchArchiveURL ¶ added in v1.3.206
func (p *GitHubProvider) BranchArchiveURL(org string, name string, branch string) string
func (*GitHubProvider) CreateIssue ¶ added in v1.0.112
func (*GitHubProvider) CreateIssueComment ¶ added in v1.0.101
func (*GitHubProvider) CreatePullRequest ¶
func (p *GitHubProvider) CreatePullRequest(data *GitPullRequestArguments) (*GitPullRequest, error)
func (*GitHubProvider) CreateRepository ¶
func (p *GitHubProvider) CreateRepository(org string, name string, private bool) (*GitRepository, error)
func (*GitHubProvider) CreateWebHook ¶ added in v1.0.6
func (p *GitHubProvider) CreateWebHook(data *GitWebHookArguments) error
func (*GitHubProvider) CurrentUsername ¶ added in v1.2.14
func (p *GitHubProvider) CurrentUsername() string
func (*GitHubProvider) DeleteRepository ¶ added in v1.0.6
func (p *GitHubProvider) DeleteRepository(org string, name string) error
func (*GitHubProvider) ForkRepository ¶
func (p *GitHubProvider) ForkRepository(originalOrg string, name string, destinationOrg string) (*GitRepository, error)
func (*GitHubProvider) GetEnterpriseApiURL ¶ added in v1.1.44
func (p *GitHubProvider) GetEnterpriseApiURL() string
GetEnterpriseApiURL returns the github enterprise API URL or blank if this provider is for the https://github.com service
func (*GitHubProvider) GetPullRequest ¶ added in v1.2.14
func (p *GitHubProvider) GetPullRequest(owner string, repo *GitRepositoryInfo, number int) (*GitPullRequest, error)
func (*GitHubProvider) GetPullRequestCommits ¶ added in v1.2.63
func (p *GitHubProvider) GetPullRequestCommits(owner string, repository *GitRepositoryInfo, number int) ([]*GitCommit, error)
func (*GitHubProvider) GetRepository ¶ added in v1.0.82
func (p *GitHubProvider) GetRepository(org string, name string) (*GitRepository, error)
func (*GitHubProvider) HasIssues ¶ added in v1.0.97
func (p *GitHubProvider) HasIssues() bool
func (*GitHubProvider) IsBitbucketCloud ¶ added in v1.2.119
func (p *GitHubProvider) IsBitbucketCloud() bool
func (*GitHubProvider) IsBitbucketServer ¶ added in v1.2.119
func (p *GitHubProvider) IsBitbucketServer() bool
func (*GitHubProvider) IsGerrit ¶ added in v1.3.70
func (p *GitHubProvider) IsGerrit() bool
func (*GitHubProvider) IsGitHub ¶
func (p *GitHubProvider) IsGitHub() bool
func (*GitHubProvider) IsGitea ¶ added in v1.1.15
func (p *GitHubProvider) IsGitea() bool
func (*GitHubProvider) IsUserInOrganisation ¶ added in v1.3.332
func (p *GitHubProvider) IsUserInOrganisation(user string, org string) (bool, error)
func (*GitHubProvider) JenkinsWebHookPath ¶ added in v1.0.6
func (p *GitHubProvider) JenkinsWebHookPath(gitURL string, secret string) string
func (*GitHubProvider) Kind ¶ added in v1.1.15
func (p *GitHubProvider) Kind() string
func (*GitHubProvider) Label ¶ added in v1.0.16
func (p *GitHubProvider) Label() string
func (*GitHubProvider) ListCommitStatus ¶ added in v1.0.80
func (p *GitHubProvider) ListCommitStatus(org string, repo string, sha string) ([]*GitRepoStatus, error)
func (*GitHubProvider) ListInvitations ¶ added in v1.3.222
func (p *GitHubProvider) ListInvitations() ([]*github.RepositoryInvitation, *github.Response, error)
func (*GitHubProvider) ListOrganisations ¶
func (p *GitHubProvider) ListOrganisations() ([]GitOrganisation, error)
func (*GitHubProvider) ListReleases ¶ added in v1.1.67
func (p *GitHubProvider) ListReleases(org string, name string) ([]*GitRelease, error)
func (*GitHubProvider) ListRepositories ¶ added in v1.0.6
func (p *GitHubProvider) ListRepositories(org string) ([]*GitRepository, error)
func (*GitHubProvider) MergePullRequest ¶ added in v1.0.80
func (p *GitHubProvider) MergePullRequest(pr *GitPullRequest, message string) error
func (*GitHubProvider) PullRequestLastCommitStatus ¶ added in v1.0.80
func (p *GitHubProvider) PullRequestLastCommitStatus(pr *GitPullRequest) (string, error)
func (*GitHubProvider) RenameRepository ¶
func (p *GitHubProvider) RenameRepository(org string, name string, newName string) (*GitRepository, error)
func (*GitHubProvider) SearchIssues ¶ added in v1.1.23
func (*GitHubProvider) SearchIssuesClosedSince ¶ added in v1.1.67
func (*GitHubProvider) ServerURL ¶ added in v1.1.51
func (p *GitHubProvider) ServerURL() string
func (*GitHubProvider) UpdatePullRequestStatus ¶ added in v1.0.63
func (p *GitHubProvider) UpdatePullRequestStatus(pr *GitPullRequest) error
func (*GitHubProvider) UpdateRelease ¶ added in v1.0.100
func (p *GitHubProvider) UpdateRelease(owner string, repo string, tag string, releaseInfo *GitRelease) error
func (*GitHubProvider) UserAuth ¶ added in v1.2.62
func (p *GitHubProvider) UserAuth() auth.UserAuth
func (*GitHubProvider) UserInfo ¶ added in v1.2.14
func (p *GitHubProvider) UserInfo(username string) *GitUser
func (*GitHubProvider) ValidateRepositoryName ¶
func (p *GitHubProvider) ValidateRepositoryName(org string, name string) error
type GitIssue ¶ added in v1.0.97
type GitIssue struct { URL string Owner string Repo string Number *int Key string Title string Body string State *string Labels []GitLabel StatusesURL *string IssueURL *string CreatedAt *time.Time UpdatedAt *time.Time ClosedAt *time.Time IsPullRequest bool User *GitUser ClosedBy *GitUser Assignees []GitUser }
func BitbucketIssueToGitIssue ¶ added in v1.1.57
func BitbucketIssueToGitIssue(bIssue bitbucket.Issue) *GitIssue
func FilterIssuesClosedSince ¶ added in v1.1.67
FilterIssuesClosedSince returns a filtered slice of all the issues closed since the given date
func (*GitIssue) IsClosedSince ¶ added in v1.1.67
IsClosedSince returns true if the issue has been closed since the given da
type GitOrganisation ¶
type GitOrganisation struct {
Login string
}
type GitProvider ¶
type GitProvider interface { OrganisationLister ListRepositories(org string) ([]*GitRepository, error) CreateRepository(org string, name string, private bool) (*GitRepository, error) GetRepository(org string, name string) (*GitRepository, error) DeleteRepository(org string, name string) error ForkRepository(originalOrg string, name string, destinationOrg string) (*GitRepository, error) RenameRepository(org string, name string, newName string) (*GitRepository, error) ValidateRepositoryName(org string, name string) error CreatePullRequest(data *GitPullRequestArguments) (*GitPullRequest, error) UpdatePullRequestStatus(pr *GitPullRequest) error GetPullRequest(owner string, repo *GitRepositoryInfo, number int) (*GitPullRequest, error) GetPullRequestCommits(owner string, repo *GitRepositoryInfo, number int) ([]*GitCommit, error) PullRequestLastCommitStatus(pr *GitPullRequest) (string, error) ListCommitStatus(org string, repo string, sha string) ([]*GitRepoStatus, error) MergePullRequest(pr *GitPullRequest, message string) error CreateWebHook(data *GitWebHookArguments) error IsGitHub() bool IsGitea() bool IsBitbucketCloud() bool IsBitbucketServer() bool IsGerrit() bool Kind() string GetIssue(org string, name string, number int) (*GitIssue, error) IssueURL(org string, name string, number int, isPull bool) string SearchIssues(org string, name string, query string) ([]*GitIssue, error) SearchIssuesClosedSince(org string, name string, t time.Time) ([]*GitIssue, error) CreateIssue(owner string, repo string, issue *GitIssue) (*GitIssue, error) HasIssues() bool AddPRComment(pr *GitPullRequest, comment string) error CreateIssueComment(owner string, repo string, number int, comment string) error UpdateRelease(owner string, repo string, tag string, releaseInfo *GitRelease) error ListReleases(org string, name string) ([]*GitRelease, error) JenkinsWebHookPath(gitURL string, secret string) string // Label returns the Git service label or name Label() string // ServerURL returns the Git server URL ServerURL() string // BranchArchiveURL returns a URL to the ZIP archive for the git branch BranchArchiveURL(org string, name string, branch string) string // Returns the current username CurrentUsername() string // Returns the current user auth UserAuth() auth.UserAuth // Returns user info, if possible UserInfo(username string) *GitUser AddCollaborator(string, string, string) error // TODO Refactor to remove bespoke types when we implement another provider ListInvitations() ([]*github.RepositoryInvitation, *github.Response, error) // TODO Refactor to remove bespoke types when we implement another provider AcceptInvitation(int64) (*github.Response, error) }
GitProvider is the interface for abstracting use of different git provider APIs
func CreateProvider ¶
func CreateProvider(server *auth.AuthServer, user *auth.UserAuth, git Gitter) (GitProvider, error)
func CreateProviderForURL ¶ added in v1.2.62
func CreateProviderForURL(authConfigSvc auth.AuthConfigService, gitKind string, hostUrl string, git Gitter) (GitProvider, error)
CreateProviderForURL creates the Git provider for the given git kind and host URL
func NewBitbucketCloudProvider ¶ added in v1.1.54
func NewBitbucketCloudProvider(server *auth.AuthServer, user *auth.UserAuth, git Gitter) (GitProvider, error)
func NewBitbucketServerProvider ¶ added in v1.2.119
func NewBitbucketServerProvider(server *auth.AuthServer, user *auth.UserAuth, git Gitter) (GitProvider, error)
func NewGerritProvider ¶ added in v1.3.70
func NewGerritProvider(server *auth.AuthServer, user *auth.UserAuth, git Gitter) (GitProvider, error)
func NewGitHubProvider ¶
func NewGitHubProvider(server *auth.AuthServer, user *auth.UserAuth, git Gitter) (GitProvider, error)
func NewGiteaProvider ¶ added in v1.0.16
func NewGiteaProvider(server *auth.AuthServer, user *auth.UserAuth, git Gitter) (GitProvider, error)
func NewGitlabProvider ¶ added in v1.1.36
func NewGitlabProvider(server *auth.AuthServer, user *auth.UserAuth, git Gitter) (GitProvider, error)
func WithGitlabClient ¶ added in v1.3.176
func WithGitlabClient(server *auth.AuthServer, user *auth.UserAuth, client *gitlab.Client, git Gitter) (GitProvider, error)
Used by unit tests to inject a mocked client
type GitPullRequest ¶
type GitPullRequest struct { URL string Author *GitUser Owner string Repo string Number *int Mergeable *bool Merged *bool HeadRef *string State *string StatusesURL *string IssueURL *string DiffURL *string MergeCommitSHA *string ClosedAt *time.Time MergedAt *time.Time LastCommitSha string Title string Body string }
func (*GitPullRequest) IsClosed ¶ added in v1.0.63
func (pr *GitPullRequest) IsClosed() bool
IsClosed returns true if the PullRequest has been closed
type GitPullRequestArguments ¶
type GitPullRequestArguments struct { Title string Body string Head string Base string GitRepositoryInfo *GitRepositoryInfo }
type GitRelease ¶ added in v1.0.100
type GitRepoStatus ¶ added in v1.0.80
type GitRepoStatus struct { ID string Context string URL string // State is the current state of the repository. Possible values are: // pending, success, error, or failure. State string `json:"state,omitempty"` // TargetURL is the URL of the page representing this status TargetURL string `json:"target_url,omitempty"` // Description is a short high level summary of the status. Description string }
func (*GitRepoStatus) IsFailed ¶ added in v1.0.80
func (s *GitRepoStatus) IsFailed() bool
func (*GitRepoStatus) IsSuccess ¶ added in v1.0.80
func (s *GitRepoStatus) IsSuccess() bool
type GitRepository ¶
type GitRepository struct { Name string AllowMergeCommit bool HTMLURL string CloneURL string SSHURL string Language string Fork bool Stars int }
func BitbucketRepositoryToGitRepository ¶ added in v1.1.46
func BitbucketRepositoryToGitRepository(bRepo bitbucket.Repository) *GitRepository
func BitbucketServerRepositoryToGitRepository ¶ added in v1.2.119
func BitbucketServerRepositoryToGitRepository(bRepo bitbucket.Repository) *GitRepository
func PickRepositories ¶ added in v1.0.6
func PickRepositories(provider GitProvider, owner string, message string, selectAll bool, filter string, in terminal.FileReader, out terminal.FileWriter, errOut io.Writer) ([]*GitRepository, error)
type GitRepositoryInfo ¶
type GitRepositoryInfo struct { URL string Scheme string Host string Organisation string Name string Project string }
func ParseGitURL ¶
func ParseGitURL(text string) (*GitRepositoryInfo, error)
ParseGitURL attempts to parse the given text as a URL or git URL-like string to determine the protocol, host, organisation and name
func (*GitRepositoryInfo) CreateProvider ¶ added in v1.0.91
func (i *GitRepositoryInfo) CreateProvider(authConfigSvc auth.AuthConfigService, gitKind string, git Gitter) (GitProvider, error)
func (*GitRepositoryInfo) CreateProviderForUser ¶
func (i *GitRepositoryInfo) CreateProviderForUser(server *auth.AuthServer, user *auth.UserAuth, gitKind string, git Gitter) (GitProvider, error)
func (*GitRepositoryInfo) HostURL ¶ added in v1.0.100
func (i *GitRepositoryInfo) HostURL() string
HostURL returns the URL to the host
func (*GitRepositoryInfo) HostURLWithoutUser ¶ added in v1.0.114
func (i *GitRepositoryInfo) HostURLWithoutUser() string
func (*GitRepositoryInfo) HttpCloneURL ¶ added in v1.0.83
func (i *GitRepositoryInfo) HttpCloneURL() string
HttpCloneURL returns the HTTPS git URL this repository
func (*GitRepositoryInfo) HttpURL ¶ added in v1.0.95
func (i *GitRepositoryInfo) HttpURL() string
HttpURL returns the URL to browse this repository in a web browser
func (*GitRepositoryInfo) HttpsURL ¶ added in v1.1.15
func (i *GitRepositoryInfo) HttpsURL() string
HttpsURL returns the URL to browse this repository in a web browser
func (*GitRepositoryInfo) IsGitHub ¶
func (i *GitRepositoryInfo) IsGitHub() bool
func (*GitRepositoryInfo) PickOrCreateProvider ¶
func (i *GitRepositoryInfo) PickOrCreateProvider(authConfigSvc auth.AuthConfigService, message string, batchMode bool, gitKind string, git Gitter, in terminal.FileReader, out terminal.FileWriter, errOut io.Writer) (GitProvider, error)
func (*GitRepositoryInfo) PipelinePath ¶ added in v1.1.10
func (i *GitRepositoryInfo) PipelinePath() string
PipelinePath returns the pipeline path for the master branch which can be used to query pipeline logs in `jx get build logs myPipelinePath`
func (*GitRepositoryInfo) PullRequestURL ¶ added in v1.0.83
func (i *GitRepositoryInfo) PullRequestURL(prName string) string
PullRequestURL returns the URL of a pull request of the given name/number
type GitRepositoryOptions ¶ added in v1.0.37
type GitWebHookArguments ¶ added in v1.0.6
type GitWebHookArguments struct { Owner string Repo *GitRepositoryInfo URL string Secret string }
type GiteaProvider ¶ added in v1.0.16
type GiteaProvider struct { Username string Client *gitea.Client Server auth.AuthServer User auth.UserAuth Git Gitter }
func (*GiteaProvider) AcceptInvitation ¶ added in v1.3.222
func (p *GiteaProvider) AcceptInvitation(ID int64) (*github.Response, error)
func (*GiteaProvider) AddCollaborator ¶ added in v1.3.222
func (p *GiteaProvider) AddCollaborator(user string, organisation string, repo string) error
func (*GiteaProvider) AddPRComment ¶ added in v1.0.91
func (p *GiteaProvider) AddPRComment(pr *GitPullRequest, comment string) error
func (*GiteaProvider) BranchArchiveURL ¶ added in v1.3.206
func (p *GiteaProvider) BranchArchiveURL(org string, name string, branch string) string
func (*GiteaProvider) CreateIssue ¶ added in v1.0.112
func (*GiteaProvider) CreateIssueComment ¶ added in v1.0.101
func (*GiteaProvider) CreatePullRequest ¶ added in v1.0.16
func (p *GiteaProvider) CreatePullRequest(data *GitPullRequestArguments) (*GitPullRequest, error)
func (*GiteaProvider) CreateRepository ¶ added in v1.0.16
func (p *GiteaProvider) CreateRepository(org string, name string, private bool) (*GitRepository, error)
func (*GiteaProvider) CreateWebHook ¶ added in v1.0.16
func (p *GiteaProvider) CreateWebHook(data *GitWebHookArguments) error
func (*GiteaProvider) CurrentUsername ¶ added in v1.2.14
func (p *GiteaProvider) CurrentUsername() string
func (*GiteaProvider) DeleteRepository ¶ added in v1.0.16
func (p *GiteaProvider) DeleteRepository(org string, name string) error
func (*GiteaProvider) ForkRepository ¶ added in v1.0.16
func (p *GiteaProvider) ForkRepository(originalOrg string, name string, destinationOrg string) (*GitRepository, error)
func (*GiteaProvider) GetPullRequest ¶ added in v1.2.14
func (p *GiteaProvider) GetPullRequest(owner string, repo *GitRepositoryInfo, number int) (*GitPullRequest, error)
func (*GiteaProvider) GetPullRequestCommits ¶ added in v1.2.63
func (p *GiteaProvider) GetPullRequestCommits(owner string, repository *GitRepositoryInfo, number int) ([]*GitCommit, error)
func (*GiteaProvider) GetRepository ¶ added in v1.0.82
func (p *GiteaProvider) GetRepository(org string, name string) (*GitRepository, error)
func (*GiteaProvider) HasIssues ¶ added in v1.0.97
func (p *GiteaProvider) HasIssues() bool
func (*GiteaProvider) IsBitbucketCloud ¶ added in v1.2.119
func (p *GiteaProvider) IsBitbucketCloud() bool
func (*GiteaProvider) IsBitbucketServer ¶ added in v1.2.119
func (p *GiteaProvider) IsBitbucketServer() bool
func (*GiteaProvider) IsGerrit ¶ added in v1.3.70
func (p *GiteaProvider) IsGerrit() bool
func (*GiteaProvider) IsGitHub ¶ added in v1.0.16
func (p *GiteaProvider) IsGitHub() bool
func (*GiteaProvider) IsGitea ¶ added in v1.1.15
func (p *GiteaProvider) IsGitea() bool
func (*GiteaProvider) JenkinsWebHookPath ¶ added in v1.0.16
func (p *GiteaProvider) JenkinsWebHookPath(gitURL string, secret string) string
func (*GiteaProvider) Kind ¶ added in v1.1.15
func (p *GiteaProvider) Kind() string
func (*GiteaProvider) Label ¶ added in v1.0.16
func (p *GiteaProvider) Label() string
func (*GiteaProvider) ListCommitStatus ¶ added in v1.0.80
func (p *GiteaProvider) ListCommitStatus(org string, repo string, sha string) ([]*GitRepoStatus, error)
func (*GiteaProvider) ListInvitations ¶ added in v1.3.222
func (p *GiteaProvider) ListInvitations() ([]*github.RepositoryInvitation, *github.Response, error)
func (*GiteaProvider) ListOrganisations ¶ added in v1.0.16
func (p *GiteaProvider) ListOrganisations() ([]GitOrganisation, error)
func (*GiteaProvider) ListReleases ¶ added in v1.1.67
func (p *GiteaProvider) ListReleases(org string, name string) ([]*GitRelease, error)
func (*GiteaProvider) ListRepositories ¶ added in v1.0.16
func (p *GiteaProvider) ListRepositories(org string) ([]*GitRepository, error)
func (*GiteaProvider) MergePullRequest ¶ added in v1.0.80
func (p *GiteaProvider) MergePullRequest(pr *GitPullRequest, message string) error
func (*GiteaProvider) PullRequestLastCommitStatus ¶ added in v1.0.80
func (p *GiteaProvider) PullRequestLastCommitStatus(pr *GitPullRequest) (string, error)
func (*GiteaProvider) RenameRepository ¶ added in v1.0.16
func (p *GiteaProvider) RenameRepository(org string, name string, newName string) (*GitRepository, error)
func (*GiteaProvider) SearchIssues ¶ added in v1.1.23
func (*GiteaProvider) SearchIssuesClosedSince ¶ added in v1.1.67
func (*GiteaProvider) ServerURL ¶ added in v1.1.51
func (p *GiteaProvider) ServerURL() string
func (*GiteaProvider) UpdatePullRequestStatus ¶ added in v1.0.63
func (p *GiteaProvider) UpdatePullRequestStatus(pr *GitPullRequest) error
func (*GiteaProvider) UpdateRelease ¶ added in v1.0.100
func (p *GiteaProvider) UpdateRelease(owner string, repo string, tag string, releaseInfo *GitRelease) error
func (*GiteaProvider) UserAuth ¶ added in v1.2.62
func (p *GiteaProvider) UserAuth() auth.UserAuth
func (*GiteaProvider) UserInfo ¶ added in v1.2.14
func (p *GiteaProvider) UserInfo(username string) *GitUser
func (*GiteaProvider) ValidateRepositoryName ¶ added in v1.0.16
func (p *GiteaProvider) ValidateRepositoryName(org string, name string) error
type GitlabProvider ¶ added in v1.1.36
type GitlabProvider struct { Username string Client *gitlab.Client Context context.Context Server auth.AuthServer User auth.UserAuth Git Gitter }
func (*GitlabProvider) AcceptInvitation ¶ added in v1.3.222
func (p *GitlabProvider) AcceptInvitation(ID int64) (*github.Response, error)
func (*GitlabProvider) AddCollaborator ¶ added in v1.3.222
func (p *GitlabProvider) AddCollaborator(user string, organisation string, repo string) error
func (*GitlabProvider) AddPRComment ¶ added in v1.1.36
func (g *GitlabProvider) AddPRComment(pr *GitPullRequest, comment string) error
func (*GitlabProvider) BranchArchiveURL ¶ added in v1.3.206
func (p *GitlabProvider) BranchArchiveURL(org string, name string, branch string) string
func (*GitlabProvider) CreateIssue ¶ added in v1.1.36
func (*GitlabProvider) CreateIssueComment ¶ added in v1.1.36
func (*GitlabProvider) CreatePullRequest ¶ added in v1.1.36
func (g *GitlabProvider) CreatePullRequest(data *GitPullRequestArguments) (*GitPullRequest, error)
func (*GitlabProvider) CreateRepository ¶ added in v1.1.36
func (g *GitlabProvider) CreateRepository(org string, name string, private bool) (*GitRepository, error)
func (*GitlabProvider) CreateWebHook ¶ added in v1.1.36
func (g *GitlabProvider) CreateWebHook(data *GitWebHookArguments) error
func (*GitlabProvider) CurrentUsername ¶ added in v1.2.14
func (p *GitlabProvider) CurrentUsername() string
func (*GitlabProvider) DeleteRepository ¶ added in v1.1.36
func (g *GitlabProvider) DeleteRepository(org, name string) error
func (*GitlabProvider) ForkRepository ¶ added in v1.1.36
func (g *GitlabProvider) ForkRepository(originalOrg, name, destinationOrg string) (*GitRepository, error)
func (*GitlabProvider) GetIssue ¶ added in v1.1.36
func (g *GitlabProvider) GetIssue(org, repo string, number int) (*GitIssue, error)
func (*GitlabProvider) GetPullRequest ¶ added in v1.2.14
func (p *GitlabProvider) GetPullRequest(owner string, repo *GitRepositoryInfo, number int) (*GitPullRequest, error)
func (*GitlabProvider) GetPullRequestCommits ¶ added in v1.2.63
func (p *GitlabProvider) GetPullRequestCommits(owner string, repository *GitRepositoryInfo, number int) ([]*GitCommit, error)
func (*GitlabProvider) GetRepository ¶ added in v1.1.36
func (g *GitlabProvider) GetRepository(org, name string) (*GitRepository, error)
func (*GitlabProvider) HasIssues ¶ added in v1.1.36
func (g *GitlabProvider) HasIssues() bool
func (*GitlabProvider) IsBitbucketCloud ¶ added in v1.2.119
func (g *GitlabProvider) IsBitbucketCloud() bool
func (*GitlabProvider) IsBitbucketServer ¶ added in v1.2.119
func (g *GitlabProvider) IsBitbucketServer() bool
func (*GitlabProvider) IsGerrit ¶ added in v1.3.70
func (g *GitlabProvider) IsGerrit() bool
func (*GitlabProvider) IsGitHub ¶ added in v1.1.36
func (g *GitlabProvider) IsGitHub() bool
func (*GitlabProvider) IsGitea ¶ added in v1.1.36
func (g *GitlabProvider) IsGitea() bool
func (*GitlabProvider) JenkinsWebHookPath ¶ added in v1.1.36
func (g *GitlabProvider) JenkinsWebHookPath(gitURL string, secret string) string
func (*GitlabProvider) Kind ¶ added in v1.1.36
func (g *GitlabProvider) Kind() string
func (*GitlabProvider) Label ¶ added in v1.1.36
func (g *GitlabProvider) Label() string
func (*GitlabProvider) ListCommitStatus ¶ added in v1.1.36
func (g *GitlabProvider) ListCommitStatus(org string, repo string, sha string) ([]*GitRepoStatus, error)
func (*GitlabProvider) ListInvitations ¶ added in v1.3.222
func (p *GitlabProvider) ListInvitations() ([]*github.RepositoryInvitation, *github.Response, error)
func (*GitlabProvider) ListOrganisations ¶ added in v1.1.36
func (g *GitlabProvider) ListOrganisations() ([]GitOrganisation, error)
func (*GitlabProvider) ListReleases ¶ added in v1.1.67
func (g *GitlabProvider) ListReleases(org string, name string) ([]*GitRelease, error)
func (*GitlabProvider) ListRepositories ¶ added in v1.1.36
func (g *GitlabProvider) ListRepositories(org string) ([]*GitRepository, error)
func (*GitlabProvider) MergePullRequest ¶ added in v1.1.36
func (g *GitlabProvider) MergePullRequest(pr *GitPullRequest, message string) error
func (*GitlabProvider) PullRequestLastCommitStatus ¶ added in v1.1.36
func (g *GitlabProvider) PullRequestLastCommitStatus(pr *GitPullRequest) (string, error)
func (*GitlabProvider) RenameRepository ¶ added in v1.1.36
func (g *GitlabProvider) RenameRepository(org, name, newName string) (*GitRepository, error)
func (*GitlabProvider) SearchIssues ¶ added in v1.1.36
func (g *GitlabProvider) SearchIssues(org, repo, query string) ([]*GitIssue, error)
func (*GitlabProvider) SearchIssuesClosedSince ¶ added in v1.1.67
func (*GitlabProvider) ServerURL ¶ added in v1.1.51
func (p *GitlabProvider) ServerURL() string
func (*GitlabProvider) UpdatePullRequestStatus ¶ added in v1.1.36
func (g *GitlabProvider) UpdatePullRequestStatus(pr *GitPullRequest) error
func (*GitlabProvider) UpdateRelease ¶ added in v1.1.36
func (g *GitlabProvider) UpdateRelease(owner string, repo string, tag string, releaseInfo *GitRelease) error
func (*GitlabProvider) UserAuth ¶ added in v1.2.62
func (p *GitlabProvider) UserAuth() auth.UserAuth
func (*GitlabProvider) UserInfo ¶ added in v1.2.14
func (p *GitlabProvider) UserInfo(username string) *GitUser
func (*GitlabProvider) ValidateRepositoryName ¶ added in v1.1.36
func (g *GitlabProvider) ValidateRepositoryName(org, name string) error
type Gitter ¶ added in v1.3.30
type Gitter interface { FindGitConfigDir(dir string) (string, string, error) ToGitLabels(names []string) []GitLabel PrintCreateRepositoryGenerateAccessToken(server *auth.AuthServer, username string, o io.Writer) Status(dir string) error Server(dir string) (string, error) Info(dir string) (*GitRepositoryInfo, error) IsFork(gitProvider GitProvider, gitInfo *GitRepositoryInfo, dir string) (bool, error) Version() (string, error) RepoName(org, repoName string) string Username(dir string) (string, error) SetUsername(dir string, username string) error Email(dir string) (string, error) SetEmail(dir string, email string) error GetAuthorEmailForCommit(dir string, sha string) (string, error) Init(dir string) error Clone(url string, directory string) error Push(dir string) error PushMaster(dir string) error PushTag(dir string, tag string) error CreatePushURL(cloneURL string, userAuth *auth.UserAuth) (string, error) ForcePushBranch(dir string, localBranch string, remoteBranch string) error CloneOrPull(url string, directory string) error Pull(dir string) error PullRemoteBranches(dir string) error PullUpstream(dir string) error AddRemote(dir string, name string, url string) error SetRemoteURL(dir string, name string, gitURL string) error UpdateRemote(dir, url string) error DiscoverRemoteGitURL(gitConf string) (string, error) DiscoverUpstreamGitURL(gitConf string) (string, error) RemoteBranches(dir string) ([]string, error) RemoteBranchNames(dir string, prefix string) ([]string, error) GetRemoteUrl(config *gitcfg.Config, name string) string Branch(dir string) (string, error) CreateBranch(dir string, branch string) error CheckoutRemoteBranch(dir string, branch string) error Checkout(dir string, branch string) error ConvertToValidBranchName(name string) string Stash(dir string) error Remove(dir, fileName string) error Add(dir string, args ...string) error CommitIfChanges(dir string, message string) error CommitDir(dir string, message string) error AddCommmit(dir string, msg string) error HasChanges(dir string) (bool, error) GetPreviousGitTagSHA(dir string) (string, error) GetCurrentGitTagSHA(dir string) (string, error) FetchTags(dir string) error Tags(dir string) ([]string, error) CreateTag(dir string, tag string, msg string) error GetRevisionBeforeDate(dir string, t time.Time) (string, error) GetRevisionBeforeDateText(dir string, dateText string) (string, error) DeleteRemoteBranch(dir string, remoteName string, branch string) error }
Gitter defines common git actions used by Jenkins X via git cli
type GroupAndCommitInfos ¶ added in v1.0.100
type GroupAndCommitInfos struct {
// contains filtered or unexported fields
}
type OrganisationChecker ¶ added in v1.3.332
type OrganisationChecker interface {
IsUserInOrganisation(user string, organisation string) (bool, error)
}
OrganisationChecker verifies if an user is member of an organization
type OrganisationLister ¶ added in v1.1.25
type OrganisationLister interface {
ListOrganisations() ([]GitOrganisation, error)
}
OrganisationLister returns a slice of GitOrganisation