github

package
v1.15.8 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

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 manages client side of Github REST API

func NewClient

func NewClient(baseURL, token string) *Client

NewClient creates a new client of Github

func (*Client) PublishCommitStatus

func (c *Client) PublishCommitStatus(repository, commitSHA, labelName, targetURL, description string,
	status CommitStatus) error

PublishCommitStatus publishes a commit status for a given SHA

type CommitStatus

type CommitStatus string

CommitStatus represents a commit status

const (
	// CommitStatusSuccess represents a success of commit status
	CommitStatusSuccess CommitStatus = "success"
	// CommitStatusSuccess represents a failure of commit status
	CommitStatusFailure CommitStatus = "failure"
)

type Github

type Github interface {
	// PublishCommitStatus publishes a commit status for a given SHA
	PublishCommitStatus(repository, commitSHA, labelName, targetURL, description string, status CommitStatus) error
}

Github is the interface of Github using Github REST API

Jump to

Keyboard shortcuts

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