github

package
v0.0.0-...-821ef61 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package github is a wrapper around the go Github client and API

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 a wrapper for the github Client

func NewClient

func NewClient(apiKey string) *Client

NewClient creates a new Client including authentication

func (*Client) CheckGithubRateLimit

func (c *Client) CheckGithubRateLimit()

CheckGithubRateLimit returns the API Rate limit to the debug console https://github.com/google/go-github/blob/master/examples/repos/main.go

func (*Client) CreateGithubIssue

func (c *Client) CreateGithubIssue(org, repo, issue string) (out string)

CreateGithubIssue creates issues in github for the supplied repo

func (*Client) GetArchive

func (c *Client) GetArchive(org, repo, branch string) (*url.URL, string, error)

GetArchive returns an Archive based on the repo and branch supplied

func (*Client) GetFile

func (c *Client) GetFile(org, repo, path string) ([]byte, string, error)

GetFile returns the contents of a file and the download URL of the file from a file within a github repository. A repository and path to a file must be supplied.

func (*Client) GetGithubUsers

func (c *Client) GetGithubUsers(org string) (out string)

GetGithubUsers returns the usernames for all users in the github organization This can then be used in the assignee section of !git issue. This is useful if you don't know the github username of the person you'd like to assign the issue to.

func (*Client) Octocat

func (c *Client) Octocat(message string) string

Octocat is a wrapper around github Client octocat prints an ASCII octocat

Jump to

Keyboard shortcuts

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