github

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2017 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package github provides convenience wrappers around the go-github package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is used to perform GitHub actions.

func NewClient

func NewClient(hostname string, user string, pass string) (*Client, error)

NewClient returns a valid GitHub client.

func (*Client) CreateComment

func (c *Client) CreateComment(repo models.Repo, pull models.PullRequest, comment string) error

CreateComment creates a comment on the pull request.

func (*Client) GetModifiedFiles

func (c *Client) GetModifiedFiles(repo models.Repo, pull models.PullRequest) ([]string, error)

GetModifiedFiles returns the names of files that were modified in the pull request. The names include the path to the file from the repo root, ex. parent/child/file.txt.

func (*Client) GetPullRequest

func (c *Client) GetPullRequest(repo models.Repo, num int) (*github.PullRequest, *github.Response, error)

GetPullRequest returns the pull request.

func (*Client) PullIsApproved

func (c *Client) PullIsApproved(repo models.Repo, pull models.PullRequest) (bool, error)

PullIsApproved returns true if the pull request was approved.

func (*Client) UpdateStatus

func (c *Client) UpdateStatus(repo models.Repo, pull models.PullRequest, state string, description string, context string) error

UpdateStatus updates the status badge on the pull request. See https://github.com/blog/1227-commit-status-api.

Jump to

Keyboard shortcuts

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