Documentation ¶
Index ¶
- Variables
- type ChangelogConf
- type Config
- type GithubClient
- type GithubClientImpl
- func (c *GithubClientImpl) AddPRtoMilestone(ctx context.Context, pull *github.PullRequest, milestone *github.Milestone) error
- func (c *GithubClientImpl) CreateMilestone(ctx context.Context, title string) (*github.Milestone, error)
- func (c *GithubClientImpl) CreateRef(ctx context.Context, r *github.Reference) error
- func (c *GithubClientImpl) CreateRelease(ctx context.Context, r *github.RepositoryRelease) error
- func (c *GithubClientImpl) DeleteRelease(ctx context.Context, release *github.RepositoryRelease) error
- func (c *GithubClientImpl) DeleteTag(ctx context.Context, tag string) error
- func (c *GithubClientImpl) EditRelease(ctx context.Context, id int64, release *github.RepositoryRelease) (*github.RepositoryRelease, error)
- func (c *GithubClientImpl) GenerateReleaseNotes(ctx context.Context, curr string) (*github.RepositoryReleaseNotes, error)
- func (c *GithubClientImpl) GetCommitRange(ctx context.Context, base, head string) ([]*github.RepositoryCommit, error)
- func (c *GithubClientImpl) GetFile(ctx context.Context, ref, file string) (io.ReadCloser, error)
- func (c *GithubClientImpl) GetLatestTag(ctx context.Context) (tag string, ver *semver.Version, err error)
- func (c *GithubClientImpl) GetPullsInCommitRange(ctx context.Context, commits []*github.RepositoryCommit) ([]*github.PullRequest, error)
- func (c *GithubClientImpl) GetRef(ctx context.Context, r string) (*github.Reference, error)
- func (c *GithubClientImpl) GetRefs(ctx context.Context, pattern string) ([]*github.Reference, error)
- func (c *GithubClientImpl) GetReleaseByTag(ctx context.Context, tag string) (*github.RepositoryRelease, error)
- func (c *GithubClientImpl) GetRepo() Repo
- type LabelsConfig
- type Releaser
- func (r *Releaser) CleanupCandidates(ctx context.Context, release *github.RepositoryRelease) (int, error)
- func (r *Releaser) CollectChangelog(pulls []*github.PullRequest) (string, error)
- func (r *Releaser) FindPreviousRelease(ctx context.Context, version *semver.Version) (*github.RepositoryRelease, error)
- func (r *Releaser) HandlePush(ctx context.Context, e *github.PushEvent)
- func (r *Releaser) HandleRelease(ctx context.Context, e *github.ReleaseEvent)
- func (r *Releaser) Increment(ctx context.Context, current *semver.Version, pulls []*github.PullRequest) (*semver.Version, error)
- func (r *Releaser) Match(ref string) bool
- func (r *Releaser) Promote(ctx context.Context, release *github.RepositoryRelease) (*github.RepositoryRelease, error)
- type Repo
- type StrategyConf
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrConfMissing = errors.New("Missing .ship-it file")
)
View Source
var ErrFileMissing = errors.New("File missing in repository")
Functions ¶
This section is empty.
Types ¶
type ChangelogConf ¶ added in v0.12.0
type ChangelogConf struct {
Type string `yaml:"type,omitempty" validate:"oneof=legacy github"`
}
type Config ¶
type Config struct { TargetBranch string `yaml:"targetBranch" validate:"required"` Labels LabelsConfig `yaml:"labels,omitempty"` Strategy StrategyConf `yaml:"strategy,omitempty"` Changelog ChangelogConf `yaml:"changelog,omitempty"` }
type GithubClient ¶
type GithubClient interface { CreateMilestone(ctx context.Context, title string) (*github.Milestone, error) AddPRtoMilestone(ctx context.Context, pull *github.PullRequest, milestone *github.Milestone) error GetReleaseByTag(ctx context.Context, tag string) (*github.RepositoryRelease, error) DeleteRelease(ctx context.Context, r *github.RepositoryRelease) error DeleteTag(ctx context.Context, tag string) error EditRelease(ctx context.Context, id int64, release *github.RepositoryRelease) (*github.RepositoryRelease, error) GetRef(ctx context.Context, r string) (*github.Reference, error) CreateRef(ctx context.Context, r *github.Reference) error CreateRelease(ctx context.Context, r *github.RepositoryRelease) error GetRefs(ctx context.Context, pattern string) ([]*github.Reference, error) GetCommitRange(ctx context.Context, base, head string) ([]*github.RepositoryCommit, error) GetPullsInCommitRange(ctx context.Context, commits []*github.RepositoryCommit) ([]*github.PullRequest, error) GetLatestTag(ctx context.Context) (tag string, ver *semver.Version, err error) GetFile(ctx context.Context, ref, file string) (io.ReadCloser, error) GenerateReleaseNotes(ctx context.Context, curr string) (*github.RepositoryReleaseNotes, error) GetRepo() Repo }
type GithubClientImpl ¶
type GithubClientImpl struct {
// contains filtered or unexported fields
}
func NewGithubClient ¶
func NewGithubClient(tc *http.Client, repo Repo) *GithubClientImpl
func (*GithubClientImpl) AddPRtoMilestone ¶
func (c *GithubClientImpl) AddPRtoMilestone(ctx context.Context, pull *github.PullRequest, milestone *github.Milestone) error
func (*GithubClientImpl) CreateMilestone ¶
func (*GithubClientImpl) CreateRelease ¶
func (c *GithubClientImpl) CreateRelease(ctx context.Context, r *github.RepositoryRelease) error
func (*GithubClientImpl) DeleteRelease ¶
func (c *GithubClientImpl) DeleteRelease(ctx context.Context, release *github.RepositoryRelease) error
func (*GithubClientImpl) DeleteTag ¶
func (c *GithubClientImpl) DeleteTag(ctx context.Context, tag string) error
func (*GithubClientImpl) EditRelease ¶
func (c *GithubClientImpl) EditRelease(ctx context.Context, id int64, release *github.RepositoryRelease) (*github.RepositoryRelease, error)
func (*GithubClientImpl) GenerateReleaseNotes ¶ added in v0.12.2
func (c *GithubClientImpl) GenerateReleaseNotes(ctx context.Context, curr string) (*github.RepositoryReleaseNotes, error)
func (*GithubClientImpl) GetCommitRange ¶
func (c *GithubClientImpl) GetCommitRange(ctx context.Context, base, head string) ([]*github.RepositoryCommit, error)
func (*GithubClientImpl) GetFile ¶
func (c *GithubClientImpl) GetFile(ctx context.Context, ref, file string) (io.ReadCloser, error)
func (*GithubClientImpl) GetLatestTag ¶
func (*GithubClientImpl) GetPullsInCommitRange ¶
func (c *GithubClientImpl) GetPullsInCommitRange(ctx context.Context, commits []*github.RepositoryCommit) ([]*github.PullRequest, error)
func (*GithubClientImpl) GetReleaseByTag ¶
func (c *GithubClientImpl) GetReleaseByTag(ctx context.Context, tag string) (*github.RepositoryRelease, error)
func (*GithubClientImpl) GetRepo ¶
func (c *GithubClientImpl) GetRepo() Repo
type LabelsConfig ¶
type Releaser ¶
type Releaser struct {
// contains filtered or unexported fields
}
func NewReleaser ¶
func (*Releaser) CleanupCandidates ¶
func (*Releaser) CollectChangelog ¶
func (r *Releaser) CollectChangelog(pulls []*github.PullRequest) (string, error)
func (*Releaser) FindPreviousRelease ¶
func (*Releaser) HandlePush ¶
func (*Releaser) HandleRelease ¶
func (r *Releaser) HandleRelease(ctx context.Context, e *github.ReleaseEvent)
func (*Releaser) Promote ¶
func (r *Releaser) Promote(ctx context.Context, release *github.RepositoryRelease) (*github.RepositoryRelease, error)
type StrategyConf ¶
type StrategyConf struct {
Type string `yaml:"type,omitempty" validate:"oneof=pre-release full-release"`
}
Click to show internal directories.
Click to hide internal directories.