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

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