Documentation ¶
Index ¶
- type Branch
- type Change
- type Commit
- type Commits
- type Issue
- type Issues
- type Labels
- type Merge
- type Merges
- type Repo
- type Tag
- type Tags
- func (t Tags) Exclude(names ...string) Tags
- func (t Tags) ExcludeRegex(regex *regexp.Regexp) Tags
- func (t Tags) Find(name string) (Tag, bool)
- func (t Tags) First(f func(Tag) bool) (Tag, bool)
- func (t Tags) Index(name string) int
- func (t Tags) Last(f func(Tag) bool) (Tag, bool)
- func (t Tags) Map(f func(t Tag) string) []string
- func (t Tags) Select(f func(Tag) bool) (Tags, Tags)
- func (t Tags) Sort() Tags
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Change ¶
type Change struct { Number int Title string Labels Labels Milestone string Time time.Time Author User WebURL string }
Change has the common fields of an issue or a merge/pull request.
type Commit ¶
Commit represents a commit.
type Commits ¶
type Commits []Commit
Commits is a collection of commits.
type Issues ¶
type Issues []Issue
Issues is a collection of issues.
func (Issues) Milestones ¶
Milestones returns a sorted list of all milestones in the collection of issues.
type Labels ¶
type Labels []string
Labels is a collection of labels.
type Merges ¶
type Merges []Merge
Merges is a collection of merges.
func (Merges) Milestones ¶
Milestones returns a sorted list of all milestones in the collection of merges.
type Repo ¶
type Repo interface { // FutureTag returns a tag that does not exist yet. FutureTag(string) Tag // CompareURL returns a URL for comparing two revisions. CompareURL(string, string) string // CheckPermissions ensures the client has all the required permissions. CheckPermissions(context.Context) error // FetchFirstCommit retrieves the firist/initial commit. FetchFirstCommit(context.Context) (Commit, error) // FetchBranch retrieves a branch by name. FetchBranch(context.Context, string) (Branch, error) // FetchDefaultBranch retrieves the default branch. FetchDefaultBranch(context.Context) (Branch, error) // FetchTags retrieves all tags. FetchTags(context.Context) (Tags, error) // FetchIssuesAndMerges retrieves closed issues and merged pull/merge requests. FetchIssuesAndMerges(context.Context, time.Time) (Issues, Merges, error) // FetchParentCommits retrieves all parent commits of a given commit hash. FetchParentCommits(context.Context, string) (Commits, error) }
Repo is the abstraction for a remote repository.
type Tag ¶
Tag represents a tag.
func (Tag) After ¶
After determines if a given tag is chronologically after another tag. Two tags are compared using the commits they refer to.
func (Tag) Before ¶
Before determines if a given tag is chronologically before another tag. Two tags are compared using the commits they refer to.
type Tags ¶
type Tags []Tag
Tags is a collection of tags.
func (Tags) ExcludeRegex ¶
ExcludeRegex excludes matched tags against the given regex and returns a new list of tags.
func (Tags) First ¶
First returns the first tag that satisifies the given predicate. If you pass a nil function, the first tag will be returned.
func (Tags) Index ¶
Index looks up a tag by its name and returns its index if found. Index returns the index of a tag specified by its name, or -1 if not found.
func (Tags) Last ¶
Last returns the last tag that satisifies the given predicate. If you pass a nil function, the last tag will be returned.