manager

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 12, 2018 License: MIT Imports: 9 Imported by: 0 modules, 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

This section is empty.

Types

type Manager

type Manager struct {
	V3         *github.Client
	V4         *githubv4.Client
	Repository string
	Owner      string
}

Manager for handling requests to the Github V3 and V4 APIs.

func New

func New(repository, token string) (*Manager, error)

New Manager

func (*Manager) AddComment

func (m *Manager) AddComment(subjectID string, comment string) error

AddComment to a PullRequest or issue (cost 1).

func (*Manager) GetChangedFiles

func (m *Manager) GetChangedFiles(pr int) ([]string, error)

GetChangedFiles in a PullRequest (not supported by V4 API).

func (*Manager) GetCommitByID

func (m *Manager) GetCommitByID(objectID string) (models.Commit, error)

GetCommitByID ... (zero cost).

func (*Manager) GetLastCommits

func (m *Manager) GetLastCommits() ([]models.PullRequestCommits, error)

GetLastCommits gets the last commit on all open Pull requests (costs 1/5000).

func (*Manager) GetPullRequestByID

func (m *Manager) GetPullRequestByID(objectID string) (models.PullRequest, error)

GetPullRequestByID ... (zero cost).

func (*Manager) SetCommitStatus

func (m *Manager) SetCommitStatus(subjectID, ctx, status string) error

SetCommitStatus for a given commit (not supported by V4 API).

Jump to

Keyboard shortcuts

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