util

package
v0.0.0-...-3a53309 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGithubClient

func NewGithubClient(token string) *github.Client

Types

type Owners

type Owners struct {
	Approvers []string `yaml:"approvers"`
	// contains filtered or unexported fields
}

func ReadOwners

func ReadOwners() (*Owners, error)

func (*Owners) Write

func (o *Owners) Write() error

type PRCallback

type PRCallback func(*github.PullRequest) error

PRCallback is a type for callbacks for processing pull requests

type PullRequestQuery

type PullRequestQuery struct {
	Org     string
	Repo    string
	DevMode bool
	Client  *github.Client
}

PullRequestQuery holds the parameters for iterating over pull requests

func (*PullRequestQuery) GetIssueComments

func (q *PullRequestQuery) GetIssueComments(pr *github.PullRequest) ([]*github.IssueComment, error)

func (*PullRequestQuery) GetPRComments

func (q *PullRequestQuery) GetPRComments(pr *github.PullRequest) ([]*github.PullRequestComment, error)

func (*PullRequestQuery) GetReviews

func (*PullRequestQuery) IsMerged

func (q *PullRequestQuery) IsMerged(pr *github.PullRequest) (bool, error)

func (*PullRequestQuery) IteratePullRequests

func (q *PullRequestQuery) IteratePullRequests(callback PRCallback) error

IteratePullRequests queries for all pull requests and invokes the callback with each PR individually

Jump to

Keyboard shortcuts

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