github

package
v2.3.1 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 9 Imported by: 1 module, 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

Index

Constants

View Source
const (
	StatusQueued     = "queued"
	StatusInProgress = "in_progress"
	StatusCompleted  = "completed"
)
View Source
const (
	StateError   = "error"
	StateFailure = "failure"
	StatePending = "pending"
	StateSuccess = "success"
)

Variables

This section is empty.

Functions

func GetTaskLink(baseURI, productName, pipelineName, displayName string, pipelineType config.PipelineType, taskID int64) string

func UIType

func UIType(pipelineType config.PipelineType) string

Types

type CIStatus

type CIStatus string
const (
	CIStatusSuccess   CIStatus = "success"
	CIStatusFailure   CIStatus = "failure"
	CIStatusNeutral   CIStatus = "neutral"
	CIStatusCancelled CIStatus = "cancelled"
	CIStatusTimeout   CIStatus = "timed_out"
	CIStatusError     CIStatus = "error"
)

type Client

type Client struct {
	*github.Client
}

func GetGithubAppClientByOwner

func GetGithubAppClientByOwner(appID int, appKey, owner, proxy string) (*Client, error)

func NewClient

func NewClient(accessToken, proxyAddress string) *Client

func (*Client) CompleteGitCheck

func (c *Client) CompleteGitCheck(gitCheckID int64, status CIStatus, check *GitCheck) error

https://developer.github.com/v3/checks/runs/#update-a-check-run

func (*Client) UpdateCheckStatus

func (c *Client) UpdateCheckStatus(opt *StatusOptions) error

type GitCheck

type GitCheck struct {
	Owner  string
	Repo   string
	Branch string // The name of the branch to perform a check against. (Required.)
	Ref    string // The SHA of the commit. (Required.)
	IsPr   bool

	AslanURL    string
	PipeName    string
	DisplayName string
	ProductName string
	PipeType    config.PipelineType
	TaskID      int64
	TestReports []*types.TestSuite
}

func (*GitCheck) DetailsURL

func (gc *GitCheck) DetailsURL() string

DetailsURL ...

type StatusOptions

type StatusOptions struct {
	Owner       string
	Repo        string
	Ref         string
	State       string
	Description string

	AslanURL    string
	PipeName    string
	DisplayName string
	ProductName string
	PipeType    config.PipelineType
	TaskID      int64
}

Jump to

Keyboard shortcuts

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