Documentation ¶
Index ¶
- func NewGithubClient(ctx context.Context, accessToken string) *github.Client
- type RepositoryClient
- func (gc *RepositoryClient) CompareBranch(ctx context.Context, baseBranch, branch string) (*ergo.StatusReport, error)
- func (gc *RepositoryClient) CreateDraftRelease(ctx context.Context, name, tagName, releaseBody, targetBranch string) error
- func (gc *RepositoryClient) CreateTag(ctx context.Context, versionName, sha, m string) (*ergo.Tag, error)
- func (gc *RepositoryClient) DiffCommits(ctx context.Context, releaseBranches []string, baseBranch string) ([]*ergo.StatusReport, error)
- func (gc *RepositoryClient) EditRelease(ctx context.Context, release *ergo.Release) (*ergo.Release, error)
- func (gc *RepositoryClient) GetRef(ctx context.Context, branch string) (*ergo.Reference, error)
- func (gc *RepositoryClient) GetRefFromTag(ctx context.Context, tag string) (*ergo.Reference, error)
- func (gc *RepositoryClient) GetRepoName() string
- func (gc *RepositoryClient) LastRelease(ctx context.Context) (*ergo.Release, error)
- func (gc *RepositoryClient) PublishRelease(ctx context.Context, releaseID int64) error
- func (gc *RepositoryClient) UpdateBranchFromTag(ctx context.Context, tag, toBranch string, force bool) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RepositoryClient ¶
type RepositoryClient struct {
// contains filtered or unexported fields
}
RepositoryClient for Github API.
func NewRepositoryClient ¶
func NewRepositoryClient(organization, repo string, client *github.Client) *RepositoryClient
NewRepositoryClient instantiate a RepositoryClient.
func (*RepositoryClient) CompareBranch ¶
func (gc *RepositoryClient) CompareBranch(ctx context.Context, baseBranch, branch string) (*ergo.StatusReport, error)
CompareBranch compare the base branch with the given one.
func (*RepositoryClient) CreateDraftRelease ¶
func (gc *RepositoryClient) CreateDraftRelease(ctx context.Context, name, tagName, releaseBody, targetBranch string) error
CreateDraftRelease creates a draft release.
func (*RepositoryClient) CreateTag ¶
func (gc *RepositoryClient) CreateTag(ctx context.Context, versionName, sha, m string) (*ergo.Tag, error)
CreateTag given the version name.
func (*RepositoryClient) DiffCommits ¶
func (gc *RepositoryClient) DiffCommits(ctx context.Context, releaseBranches []string, baseBranch string) ([]*ergo.StatusReport, error)
DiffCommits is responsible to find the diff-commits and return a StatusReport for each of given releaseBranches.
func (*RepositoryClient) EditRelease ¶
func (gc *RepositoryClient) EditRelease(ctx context.Context, release *ergo.Release) (*ergo.Release, error)
EditRelease allows to edit a repository release.
func (*RepositoryClient) GetRefFromTag ¶
GetRefFromTag get reference from tag.
func (*RepositoryClient) GetRepoName ¶
func (gc *RepositoryClient) GetRepoName() string
GetRepoName return the repository name.
func (*RepositoryClient) LastRelease ¶
LastRelease fetches the latest release for a repository.
func (*RepositoryClient) PublishRelease ¶ added in v0.7.0
func (gc *RepositoryClient) PublishRelease(ctx context.Context, releaseID int64) error
PublishRelease changes the draft flag of a repo release to false.
func (*RepositoryClient) UpdateBranchFromTag ¶
func (gc *RepositoryClient) UpdateBranchFromTag(ctx context.Context, tag, toBranch string, force bool) error
UpdateBranchFromTag is responsible to update a branch from tag.
Click to show internal directories.
Click to hide internal directories.