github

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2017 License: BSD-3-Clause Imports: 15 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 struct {
	// contains filtered or unexported fields
}

Client is a github client

func New

func New(repo *git.Repository) (*Client, error)

New creates a new github client

func (*Client) AddArtifact

func (c *Client) AddArtifact(ctx context.Context, rel *artifact.Release, file *artifact.File) error

AddArtifact adds a file on to a release

func (*Client) Commit

func (c *Client) Commit(ctx context.Context, repo *git.Repository, tag string, file *artifact.File) error

Commit commits a file to the repo

func (*Client) CreateRelease

func (c *Client) CreateRelease(ctx context.Context, rel *artifact.Release) error

CreateRelease creates a new release on github

func (*Client) Info

func (c *Client) Info(ctx context.Context) (*Info, error)

Info returns the meta info about a repo

func (*Client) Releases

func (c *Client) Releases(ctx context.Context) ([]*github.RepositoryRelease, error)

Releases returns a list of semver sorted releases that exist on the repo

func (*Client) Tags

func (c *Client) Tags(ctx context.Context) (Tags, error)

Tags returns a list of semver sorted tags that exist on the repo

type Info

type Info struct {
	Description string
	Homepage    string
}

Info holds information about a github repo

type Tags

type Tags []*github.RepositoryTag

Tags is the list of tags on the repo, used for computing the difference with releases

func (Tags) Difference

func (tags Tags) Difference(releases []*github.RepositoryRelease) Tags

Difference computes the difference between the repository tags, and releases. It returns the tags that do not have matching releases.

func (Tags) NoPrerelease

func (tags Tags) NoPrerelease() Tags

NoPrerelease filters out any tags that are prereleases

func (Tags) ValidSemver

func (tags Tags) ValidSemver() Tags

ValidSemver filters out any tags that don't have valid semvers

Jump to

Keyboard shortcuts

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