Documentation
¶
Index ¶
- Constants
- func GetTaskLink(baseURI, productName, pipelineName string, pipelineType config.PipelineType, ...) string
- func NewGithubAppClient(accessToken, apiServer, proxyAddress string) *github.Client
- func UIType(pipelineType config.PipelineType) string
- type CIStatus
- type CheckService
- type Client
- type Config
- type GitCheck
Constants ¶
View Source
const ( // StatusQueued ... StatusQueued = "queued" // StatusInProgress ... StatusInProgress = "in_progress" // StatusCompleted ... StatusCompleted = "completed" )
View Source
const ( // CIStatusSuccess ... CIStatusSuccess = CIStatus("success") // CIStatusFailure ... CIStatusFailure = CIStatus("failure") // CIStatusNeutral ... CIStatusNeutral = CIStatus("neutral") // CIStatusCancelled ... CIStatusCancelled = CIStatus("cancelled") // CIStatusTimeout ... CIStatusTimeout = CIStatus("timed_out") )
Variables ¶
This section is empty.
Functions ¶
func GetTaskLink ¶
func GetTaskLink(baseURI, productName, pipelineName string, pipelineType config.PipelineType, taskID int64) string
func NewGithubAppClient ¶
func UIType ¶
func UIType(pipelineType config.PipelineType) string
Types ¶
type CheckService ¶
type CheckService struct {
// contains filtered or unexported fields
}
CheckService ...
func (*CheckService) CompleteGitCheck ¶
func (s *CheckService) CompleteGitCheck(gitCheckID int64, status CIStatus, check *GitCheck) error
CompleteGitCheck ... https://developer.github.com/v3/checks/runs/#update-a-check-run
func (*CheckService) StartGitCheck ¶
func (s *CheckService) StartGitCheck(check *GitCheck) (int64, error)
https://developer.github.com/v3/checks/runs/#create-a-check-run
func (*CheckService) UpdateGitCheck ¶
func (s *CheckService) UpdateGitCheck(gitCheckID int64, check *GitCheck) error
UpdateGitCheck ... https://developer.github.com/v3/checks/runs/#update-a-check-run
type Client ¶
type Client struct {
Git *github.Client
InstallationToken string
//Repo *RepoService
Checks *CheckService
}
Client ...
func NewDynamicClient ¶
NewDynamicClient init git client & logger according to user's installation ID
type Config ¶
type Config struct {
APIServer string
ProxyAddr string
NoCache bool
AccessToken string
HookURL string
HookSecret string
AppKey string
AppID int
InstallationID int
}
Config ...
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
ProductName string
PipeType config.PipelineType
TaskID int64
TestReports []*commonmodels.TestSuite
}
GitCheck ...
Click to show internal directories.
Click to hide internal directories.