repository

package
v0.0.0-...-2a0f026 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PullRequestQuery

type PullRequestQuery struct {
	Author    string
	Org       string
	State     string
	StartDate string
}

PullRequestQuery holds query for GitHub API.

type PullRequestRepo

type PullRequestRepo interface {
	GetPullRequests(PullRequestQuery) ([]PullRequests, error)
}

PullRequestRepo is an interface for GitHub pull request repository.

func NewPullRequestRepo

func NewPullRequestRepo(
	ctx context.Context,
	client *github.Client,
	perPage int,
) PullRequestRepo

NewPullRequestRepo creates new PullRequest repository.

type PullRequests

type PullRequests struct {
	Issue *github.Issue
	Files []*github.CommitFile
	Stats Stats
}

PullRequests holds the pull requests information.

type Stats

type Stats struct {
	NumFiles  int
	Additions int
	Deletions int
	Changes   int
	Total     int
}

Stats holds the results of pull requests stats.

type UserRepo

type UserRepo interface {
	User() (*github.User, error)
}

UserRepo is an interface for GitHub user repository.

func NewUserRepo

func NewUserRepo(ctx context.Context, gh *github.Client) UserRepo

NewUserRepo creates new GitHub user repository.

Jump to

Keyboard shortcuts

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