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: ? 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

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