issuesyncgithub

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2019 License: Apache-2.0 Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetUser

func GetUser(g Client, log logrus.Entry, timeout time.Duration, userName string) (github.User, error)

GetUser returns a GitHub user from its login.

func ListComments

func ListComments(g Client, timeout time.Duration, user string, repoName string, issue github.Issue) ([]*github.IssueComment, error)

ListComments returns the list of all comments on a GitHub issue in ascending order of creation.

func ListIssues

func ListIssues(g Client, timeout time.Duration, user string, repoName string, since time.Time) ([]models.ExtendedGithubIssue, error)

ListIssues returns the list of GitHub issues since the last run of the tool.

Types

type Client

type Client interface {
	// contains filtered or unexported methods
}

Client is a wrapper around the GitHub API Client library we use. It allows us to swap in other implementations, such as a dry run clients, or mock clients for testing.

func NewClient

func NewClient(config cfg.Config) (Client, error)

NewClient creates a Client and returns it; which implementation it uses depends on the configuration of this run. For example, a dry-run clients may be created which does not make any requests that would change anything on the server, but instead simply prints out the actions that it's asked to take.

type TestGHClient

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

func NewTestClient

func NewTestClient() TestGHClient

Jump to

Keyboard shortcuts

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