data

package
v0.0.0-...-f33053b Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AverageHandoverPerMR

type AverageHandoverPerMR struct {
	Week     string
	Handover float32
}

type AverageMRSizeByWeek

type AverageMRSizeByWeek struct {
	Week string
	Size int
	N    int
}

type AverageMrReviewDepthByWeek

type AverageMrReviewDepthByWeek struct {
	Week  string
	Depth float32
}

type CodeChangesCount

type CodeChangesCount struct {
	Count int
	Week  string
}

type CommitCountByWeek

type CommitCountByWeek struct {
	Week  string
	Count int
}

type CrawlInstance

type CrawlInstance struct {
	Id           int64
	RepositoryId int64
	StartedAt    time.Time
	TimeFrame
}

type Event

type Event struct {
	Id                  int64
	Timestamp           int64
	Type                EventType
	Actor               EventUserInfo
	MergeRequestId      int64
	MergeRequestCanonId int64
	MergeRequestTitle   string
	MergeRequestUrl     string
}

type EventSlice

type EventSlice []Event

func SmushEventSlice

func SmushEventSlice(events EventSlice) EventSlice

func (EventSlice) Len

func (d EventSlice) Len() int

func (EventSlice) Less

func (d EventSlice) Less(i, j int) bool

func (EventSlice) Swap

func (d EventSlice) Swap(i, j int)

type EventType

type EventType int
const (
	UNKNOWN EventType = iota
	OPENED
	STARTED_CODING
	STARTED_PICKUP
	STARTED_REVIEW
	NOTED
	ASSIGNED
	CLOSED
	COMMENTED
	COMMITTED
	CONVERT_TO_DRAFT
	MERGED
	READY_FOR_REVIEW
	REVIEW_REQUEST_REMOVED
	REVIEW_REQUESTED
	REVIEWED
	UNASSIGNED
)

type EventUserInfo

type EventUserInfo struct {
	Id         int64
	Name       string
	ProfileUrl string
	AvatarUrl  string
}

type MergeFrequencyByWeek

type MergeFrequencyByWeek struct {
	Week   string
	Amount float32
}

type MrCountByWeek

type MrCountByWeek struct {
	Week  string
	Count int
}

type NullRows

type NullRows struct {
	DateId         int64
	UserId         int64
	MergeRequestId int64
	RepositoryId   int64
}

type Store

type Store struct {
	DbUrl string
}

func (*Store) GetAverageHandoverPerMR

func (s *Store) GetAverageHandoverPerMR(weeks []string, teamMembers []int64) (map[string]AverageHandoverPerMR, float64, error)

func (*Store) GetAverageMRSize

func (s *Store) GetAverageMRSize(weeks []string, teamMembers []int64) (map[string]AverageMRSizeByWeek, float64, error)

func (*Store) GetAverageReviewDepth

func (s *Store) GetAverageReviewDepth(weeks []string, teamMembers []int64) (map[string]AverageMrReviewDepthByWeek, float64, error)

func (*Store) GetCrawlInstances

func (s *Store) GetCrawlInstances(from, to int64) ([]CrawlInstance, error)

func (*Store) GetDeployFrequency

func (s *Store) GetDeployFrequency(weeks []string) (interface{}, error)

func (*Store) GetEventSlices

func (s *Store) GetEventSlices(date time.Time, teamMembers []int64) (EventSlice, error)

func (*Store) GetMRsMergedWithoutReview

func (s *Store) GetMRsMergedWithoutReview(weeks []string, teamMembers []int64) (map[string]MrCountByWeek, float64, error)

func (*Store) GetMergeFrequency

func (s *Store) GetMergeFrequency(weeks []string, teamMembers []int64) (map[string]MergeFrequencyByWeek, float64, error)

func (*Store) GetMergeRequestEvents

func (s *Store) GetMergeRequestEvents(mrId int64) (EventSlice, error)

func (*Store) GetNewCodePercentage

func (s *Store) GetNewCodePercentage(weeks []string) (interface{}, error)

func (*Store) GetNullRows

func (s *Store) GetNullRows() (*NullRows, error)

func (*Store) GetRefactorPercentage

func (s *Store) GetRefactorPercentage(weeks []string) (interface{}, error)

func (*Store) GetReworkPercentage

func (s *Store) GetReworkPercentage(weeks []string) (interface{}, error)

func (*Store) GetTeamMembers

func (s *Store) GetTeamMembers(team *int64) ([]int64, error)

func (*Store) GetTeams

func (s *Store) GetTeams() (TeamSlice, error)

func (*Store) GetTotalCodeChanges

func (s *Store) GetTotalCodeChanges(weeks []string, teamMembers []int64) (map[string]CodeChangesCount, float64, error)

func (*Store) GetTotalCommits

func (s *Store) GetTotalCommits(weeks []string, teamMembers []int64) (map[string]CommitCountByWeek, float64, error)

func (*Store) GetTotalMrsOpened

func (s *Store) GetTotalMrsOpened(weeks []string, teamMembers []int64) (map[string]MrCountByWeek, float64, error)

func (*Store) GetTotalReviews

func (s *Store) GetTotalReviews(weeks []string, teamMembers []int64) (map[string]TotalReviewsByWeek, float64, error)

type Team

type Team struct {
	Id   int64
	Name string
}

type TeamSlice

type TeamSlice []Team

type TimeFrame

type TimeFrame struct {
	Since time.Time
	Until time.Time
}

type TimeFrameSlice

type TimeFrameSlice []TimeFrame

func FindGaps

func FindGaps(from, to time.Time, timeFrames TimeFrameSlice) TimeFrameSlice

func (TimeFrameSlice) Len

func (tfs TimeFrameSlice) Len() int

func (TimeFrameSlice) Less

func (tfs TimeFrameSlice) Less(i, j int) bool

func (TimeFrameSlice) Swap

func (tfs TimeFrameSlice) Swap(i, j int)

type TotalReviewsByWeek

type TotalReviewsByWeek struct {
	Week  string
	Count int
}

Jump to

Keyboard shortcuts

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