githubutil

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2019 License: Apache-2.0 Imports: 10 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 CompareCommits

func CompareCommits(base, head string) ([]github.RepositoryCommit, error)

CompareCommits returns all commits between two github tags or hashes

func CreateRelease

func CreateRelease(tagName, body string) error

CreateRelease creates a release in Github

func DeleteRelease

func DeleteRelease(id int64) error

DeleteRelease deletes a release in Github

func GetPullRequestIssuesBetween

func GetPullRequestIssuesBetween(start, end time.Time) (map[string]github.Issue, error)

GetPullRequestIssuesBetween fetches all pull request issues between two timestamps, using the Github Search api. Returns a map of the merge commit SHAs and the issues.

func GetPullRequests

func GetPullRequests() (map[string]*github.PullRequest, error)

GetPullRequests fetches the 100 most recent pull requests

func GetRelease

func GetRelease(tag string) (*github.RepositoryRelease, error)

GetRelease fetches a release in Github by tag

func Initialize

func Initialize(accessToken string, r Repository)

Initialize initializes the github and githubv4 clients If a Github authorized httpClient is passed as an argument, the github clients will be able to fetch data from private resources

Types

type Repository

type Repository struct {
	Owner string
	Name  string
}

Repository holds the owner and name of a Github repository

var (
	// Repo is the repository used for fetching of data with the Github clients
	Repo Repository
)

func (*Repository) Full

func (r *Repository) Full() string

Full returns the full repository name with the owner included

func (*Repository) Set

func (r *Repository) Set(input string) error

Set is part of the Value interface for cobra custom flags

func (*Repository) String

func (r *Repository) String() string

String is part of the Value interface for cobra custom flags

func (*Repository) Type

func (r *Repository) Type() string

Type is part of the Value interface for cobra custom flags

type Tag

type Tag struct {
	Data    graphqlTag
	Version *version.Version
}

Tag holds data about a git tag and it's target commit sha / url

func GetTags

func GetTags() ([]Tag, error)

GetTags fetches the 100 most recent tags

func (*Tag) IsBetween

func (t *Tag) IsBetween(base, head *version.Version) bool

IsBetween checks if the tag version is part of the release range. This between is inclusive on the head version: base < t.Version <= head

Jump to

Keyboard shortcuts

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