github

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Asset

type Asset struct {
	Path string
	URL  string
}

type Client

type Client struct {
	*github.Client
	// contains filtered or unexported fields
}

Client is the client for interacting with the GitHub API

func NewClient

func NewClient(owner, repo, token, baseURL, uploadURL string) *Client

NewClient creates and initializes a new GitHubClient

func (*Client) CreatePullRequest

func (c *Client) CreatePullRequest(owner string, repo string, message string, head string, base string) (string, error)

CreatePullRequest creates a pull request in the repository specified by repoURL. The return value is the pull request URL.

func (*Client) CreateRelease

func (c *Client) CreateRelease(ctx context.Context, input *Release) error

CreateRelease creates a new release object in the GitHub API

func (*Client) GetRelease

func (c *Client) GetRelease(ctx context.Context, tag string) (*Release, error)

GetRelease queries the GitHub API for a specified release object

type Release

type Release struct {
	Name        string
	Description string
	Assets      []*Asset
	Commit      string
}

Jump to

Keyboard shortcuts

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