analysis

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Filter added in v0.3.0

func Filter(issues map[int]github.Issue, filter func(github.Issue) bool) map[int]github.Issue

Types

type IssueCommentSummary added in v0.3.0

type IssueCommentSummary struct {
	TimeFrame

	Responded  map[int]time.Duration // duration of first response
	NoResponse map[int]time.Time     // time of issue creation
}

func NewIssueCommentSummary added in v0.3.0

func NewIssueCommentSummary() *IssueCommentSummary

func SummarizeIssueComments added in v0.3.0

func SummarizeIssueComments(opts SummarizeIssueCommentsOptions) *IssueCommentSummary

func (*IssueCommentSummary) OutOfSLA added in v0.3.0

type IssueSummary

type IssueSummary struct {
	Total     int
	Open      int
	Closed    int
	Durations []time.Duration // time to close
}

func (*IssueSummary) Union

func (s *IssueSummary) Union(other *IssueSummary)

type PullRequestReviewReport

type PullRequestReviewReport struct {
	TimeFrame

	Summaries map[string]*PullRequestReviewSummary
}

func NewPullRequestReviewReport

func NewPullRequestReviewReport(timeFrame TimeFrame) *PullRequestReviewReport

func (*PullRequestReviewReport) ReviewCount

func (r *PullRequestReviewReport) ReviewCount() map[string]int

func (*PullRequestReviewReport) Summarize

type PullRequestReviewSummary

type PullRequestReviewSummary struct {
	TimeFrame

	Reviewers map[string]set.Set[int]
}

func NewPullRequestReviewSummary

func NewPullRequestReviewSummary() *PullRequestReviewSummary

func SummarizePullRequestReviews

func SummarizePullRequestReviews(reviews map[int][]github.PullRequestReview, timeFrame TimeFrame) *PullRequestReviewSummary

func (*PullRequestReviewSummary) ReviewCount

func (s *PullRequestReviewSummary) ReviewCount() map[string]int

type PullRequestSummary

type PullRequestSummary struct {
	Total     int
	Open      int
	Closed    int
	Merged    int
	Durations []time.Duration // time to merge
}

func (*PullRequestSummary) Union

func (s *PullRequestSummary) Union(other *PullRequestSummary)

type Report

type Report struct {
	TimeFrame

	Summaries map[string]*Summary
}

func NewReport

func NewReport(timeFrame TimeFrame) *Report

func (*Report) Abstract

func (r *Report) Abstract() *Summary

func (*Report) Summarize

func (r *Report) Summarize(name string, issues map[int]github.Issue) *Summary

type RepositorySummary

type RepositorySummary struct {
	Issue       *IssueSummary
	PullRequest *PullRequestSummary
}

func NewRepositorySummary

func NewRepositorySummary() *RepositorySummary

func (*RepositorySummary) Union

func (s *RepositorySummary) Union(other *RepositorySummary)

type SummarizeIssueCommentsOptions added in v0.3.0

type SummarizeIssueCommentsOptions struct {
	TimeFrame   TimeFrame
	Issues      map[int]github.Issue
	Comments    map[int][]github.IssueComment
	Maintainers set.Set[string]
}

type Summary

type Summary struct {
	*RepositorySummary
	TimeFrame

	Authors map[string]*RepositorySummary
}

func NewSummary

func NewSummary() *Summary

func Summarize

func Summarize(issues map[int]github.Issue, timeFrame TimeFrame) *Summary

func (*Summary) Union

func (s *Summary) Union(other *Summary)

type TimeFrame

type TimeFrame struct {
	Start time.Time
	End   time.Time
}

func (*TimeFrame) Contains

func (tf *TimeFrame) Contains(t time.Time) bool

func (*TimeFrame) Union

func (tf *TimeFrame) Union(other TimeFrame)

Jump to

Keyboard shortcuts

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