generic

package
v0.0.0-...-f2f2cf5 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: MIT Imports: 8 Imported by: 1

Documentation

Overview

Package generic represents generic issues and changelists.

Index

Constants

View Source
const (
	Abandoned = ChangelistStatus(iota)
	Draft
	New
	Merged
	Unknown
)

Variables

This section is empty.

Functions

func AuthoredChangelistsToCells

func AuthoredChangelistsToCells(cls []*Changelist) []*sheets.Row

func InferTimeRange

func InferTimeRange(now time.Time, weekOf string) (start, end time.Time, err error)

InferTimeRange gets the start and end time for a weekly snippet report. If the optional weekOf parameter is provided, the time range is for the week in which the date falls, not inferred.

func IsMergedBefore

func IsMergedBefore(cl *Changelist, end time.Time) bool

func IssuesToCells

func IssuesToCells(username string, issues []*Issue) []*rsheets.Row

func ReviewedChangelistsToCells

func ReviewedChangelistsToCells(cls []*Changelist) []*sheets.Row

Types

type Changelist

type Changelist struct {
	Number           int
	Link             string
	Subject          string
	Message          string
	Comments         []string
	Branch           string
	Author           string
	Repo             string
	Status           ChangelistStatus
	MergedAt         time.Time
	AssociatedIssues []*Issue
	AffectedFiles    []string
}

func (*Changelist) Category

func (cl *Changelist) Category() string

type ChangelistStatus

type ChangelistStatus int

func (ChangelistStatus) String

func (status ChangelistStatus) String() string

type Issue

type Issue struct {
	Number                 int
	Link                   string
	Repo                   string
	Title                  string
	OpenedBy, ClosedBy     string
	DateOpened, DateClosed time.Time
	Comments               int
	Labels                 []string
	Transferred            bool
	Milestone              string
}

func (Issue) Category

func (issue Issue) Category() string

func (Issue) Closed

func (issue Issue) Closed() bool

func (Issue) ClosedByUser

func (issue Issue) ClosedByUser(username string) bool

func (Issue) OpenedByUser

func (issue Issue) OpenedByUser(username string) bool

Jump to

Keyboard shortcuts

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