github

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2022 License: BSD-3-Clause Imports: 7 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGithubClient

func NewGithubClient(ctx context.Context, accessToken string) *github.Client

NewGithubClient set up a github client.

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) GetRef

func (gc *RepositoryClient) GetRef(ctx context.Context, branch string) (*ergo.Reference, error)

GetRef branch reference object given the branch name.

func (*RepositoryClient) GetRefFromTag

func (gc *RepositoryClient) GetRefFromTag(ctx context.Context, tag string) (*ergo.Reference, error)

GetRefFromTag get reference from tag.

func (*RepositoryClient) GetRepoName

func (gc *RepositoryClient) GetRepoName() string

GetRepoName return the repository name.

func (*RepositoryClient) LastRelease

func (gc *RepositoryClient) LastRelease(ctx context.Context) (*ergo.Release, error)

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.

Jump to

Keyboard shortcuts

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