ghra

package
v0.0.0-...-b50d03b Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ActivityReport

type ActivityReport struct {
	RepoActivityReports map[string]*RepoActivityReport
	TotalIssues         int
	TotalPullRequests   int
}

type GitHubRepoActivityOptions

type GitHubRepoActivityOptions struct {
	Repos   []string
	DaysOld int

	APIEndpoint string
	Token       string
}

type GitHubRepoActivityService

type GitHubRepoActivityService struct {
	// contains filtered or unexported fields
}

func NewGitHubRepoActivityService

func NewGitHubRepoActivityService(options *GitHubRepoActivityOptions) *GitHubRepoActivityService

func (*GitHubRepoActivityService) BuildQuery

func (ghra *GitHubRepoActivityService) BuildQuery(issueType string) string

func (*GitHubRepoActivityService) BuildReport

func (ghra *GitHubRepoActivityService) BuildReport() (*ActivityReport, error)

func (*GitHubRepoActivityService) FetchIssues

func (ghra *GitHubRepoActivityService) FetchIssues(issueType string) (*[]IssueInfo, error)

type IssueAuthor

type IssueAuthor struct {
	DisplayName *string `json:"title"`
	ProfileURL  *string `json:"url"`
}

type IssueInfo

type IssueInfo struct {
	ID     *int64      `json:"id,omitempty"`
	Number *int        `json:"number,omitempty"`
	Title  *string     `json:"title"`
	Author IssueAuthor `json:"author"`
	Repo   string      `json:"repo"`
	URL    *string     `json:"url"`
	Status *string     `json:"status"`
	Age    string      `json:"age"`
}

type RepoActivityReport

type RepoActivityReport struct {
	Issues       []IssueInfo
	PullRequests []IssueInfo
}

type RepoActivityService

type RepoActivityService interface {
	FetchIssues(string) (*[]IssueInfo, error)
	BuildQuery(string) string
	BuildReport() (*ActivityReport, error)
}

Jump to

Keyboard shortcuts

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