Documentation
¶
Index ¶
- Constants
- func CompareHostOfURLS(uri1, uri2 string) bool
- func GetCheckName(status StatusOpts, pacopts *info.PacOpts) string
- func GetHTMLTemplate(commentType CommentType) string
- func GetMarkdownTemplate(commentType CommentType) string
- func GetPipelineRunAndBranchNameFromCancelComment(comment string) (string, string, error)
- func GetPipelineRunAndBranchNameFromTestComment(comment string) (string, string, error)
- func GetPipelineRunFromCancelComment(comment string) string
- func GetPipelineRunFromTestComment(comment string) string
- func IsCancelComment(comment string) bool
- func IsOkToTestComment(comment string) bool
- func IsTestRetestComment(comment string) bool
- func IsZeroSHA(sha string) bool
- func Valid(value string, validValues []string) bool
- func ValidateYaml(content []byte, filename string) error
- type CommentType
- type Interface
- type StatusOpts
Constants ¶
View Source
const DefaultProviderAPIUser = "git"
View Source
const (
GitHubApp = "GitHubApp"
)
View Source
const ValidationErrorTemplate = `> [!CAUTION]
> There are some errors in your PipelineRun template.
| PipelineRun | Error |
|------|-------|`
Variables ¶
This section is empty.
Functions ¶
func CompareHostOfURLS ¶ added in v0.13.0
CompareHostOfURLS compares the host of two parsed URLs and returns true if they are.
func GetCheckName ¶ added in v0.31.0
func GetCheckName(status StatusOpts, pacopts *info.PacOpts) string
GetCheckName returns the name of the check to be created based on the status and the pacopts. If the pacopts.ApplicationName is set, it will be used as the check name. Otherwise, the OriginalPipelineRunName will be used. If the OriginalPipelineRunName is not set, an empty string will be returned. The check name will be in the format "ApplicationName / OriginalPipelineRunName".
func GetHTMLTemplate ¶ added in v0.34.0
func GetHTMLTemplate(commentType CommentType) string
func GetMarkdownTemplate ¶ added in v0.34.0
func GetMarkdownTemplate(commentType CommentType) string
func GetPipelineRunAndBranchNameFromCancelComment ¶ added in v0.22.0
func GetPipelineRunAndBranchNameFromTestComment ¶ added in v0.22.0
func GetPipelineRunFromCancelComment ¶ added in v0.15.0
func GetPipelineRunFromTestComment ¶ added in v0.15.0
func IsCancelComment ¶ added in v0.15.0
func IsOkToTestComment ¶
func IsTestRetestComment ¶
func ValidateYaml ¶ added in v0.31.0
Types ¶
type CommentType ¶ added in v0.34.0
type CommentType int
const ( StartingPipelineType CommentType = iota PipelineRunStatusType QueueingPipelineType )
type Interface ¶
type Interface interface { SetLogger(*zap.SugaredLogger) Validate(ctx context.Context, params *params.Run, event *info.Event) error Detect(*http.Request, string, *zap.SugaredLogger) (bool, bool, *zap.SugaredLogger, string, error) ParsePayload(context.Context, *params.Run, *http.Request, string) (*info.Event, error) IsAllowed(context.Context, *info.Event) (bool, error) IsAllowedOwnersFile(context.Context, *info.Event) (bool, error) CreateStatus(context.Context, *info.Event, StatusOpts) error GetTektonDir(context.Context, *info.Event, string, string) (string, error) // ctx, event, path, provenance GetFileInsideRepo(context.Context, *info.Event, string, string) (string, error) // ctx, event, path, branch SetClient(context.Context, *params.Run, *info.Event, *v1alpha1.Repository, *events.EventEmitter) error SetPacInfo(*info.PacOpts) GetCommitInfo(context.Context, *info.Event) error GetConfig() *info.ProviderConfig GetFiles(context.Context, *info.Event) (changedfiles.ChangedFiles, error) GetTaskURI(ctx context.Context, event *info.Event, uri string) (bool, string, error) CreateToken(context.Context, []string, *info.Event) (string, error) CheckPolicyAllowing(context.Context, *info.Event, []string) (bool, string) GetTemplate(CommentType) string CreateComment(ctx context.Context, event *info.Event, comment, updateMarker string) error }
Click to show internal directories.
Click to hide internal directories.