pkg

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	HandlePushEvent(*github.PushEvent, Config) (interface{}, error)
	HandleReleaseEvent(*github.ReleaseEvent, Config) (interface{}, error)
	GetFile(repo Repo, ref, file string) (io.ReadCloser, error)
}

type ClientImpl

type ClientImpl struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(tc *http.Client, log echo.Logger) *ClientImpl

func (*ClientImpl) Cleanup

func (c *ClientImpl) Cleanup(ev *github.ReleaseEvent) (interface{}, error)

func (*ClientImpl) CollectChangelog

func (c *ClientImpl) CollectChangelog(pulls map[int]*github.PullRequest) (string, error)

func (*ClientImpl) FindLast

func (c *ClientImpl) FindLast(owner, repo string, next *semver.Version) (*semver.Version, error)

func (*ClientImpl) GetFile added in v0.8.0

func (c *ClientImpl) GetFile(repo Repo, ref, file string) (io.ReadCloser, error)

func (*ClientImpl) HandlePushEvent

func (c *ClientImpl) HandlePushEvent(ev *github.PushEvent, config Config) (interface{}, error)

func (*ClientImpl) HandleReleaseEvent

func (c *ClientImpl) HandleReleaseEvent(ev *github.ReleaseEvent, config Config) (interface{}, error)

func (*ClientImpl) LabelPRs

func (c *ClientImpl) LabelPRs(owner, repo string, next *semver.Version) (interface{}, error)

func (*ClientImpl) NextTag

func (c *ClientImpl) NextTag(owner, repo, latest string, pulls map[int]*github.PullRequest) (string, error)

func (*ClientImpl) Promote

func (c *ClientImpl) Promote(ev *github.ReleaseEvent) (interface{}, error)

func (*ClientImpl) ReleaseCandidate

func (c *ClientImpl) ReleaseCandidate(owner, repo, latest, target string) (interface{}, error)

type Config added in v0.8.0

type Config struct {
	TargetBranch string `yaml:"targetBranch,omitempty"`
}

type HandledEvent added in v0.8.0

type HandledEvent interface {
	GetInstallation() *github.Installation
}

type Repo added in v0.8.0

type Repo interface {
	GetOwner() *github.User
	GetName() string
}

type Server

type Server interface {
	Serve() error
}

type ServerImpl

type ServerImpl struct {
	AppID          int64
	PrivateKeyFile string
	GithubSecret   []byte
	Port           int32
	LogLevel       log.Lvl
}

func (*ServerImpl) Serve

func (s *ServerImpl) Serve() error

type WebhookHandler

type WebhookHandler struct {
	Secret        []byte
	AppsTransport *ghinstallation.AppsTransport
}

func NewHandler

func NewHandler(atr *ghinstallation.AppsTransport, secret []byte) *WebhookHandler

func (*WebhookHandler) HandleGithub

func (h *WebhookHandler) HandleGithub(c echo.Context) error

Jump to

Keyboard shortcuts

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