Documentation ¶
Index ¶
Constants ¶
View Source
const (
OKToTestCommentRegexp = `(^|\n)\/ok-to-test(\r\n|\r|\n|$)`
)
Variables ¶
View Source
var ErrInvalidContentType = errors.New("form parameter encoding not supported, please change the hook to send JSON payloads")
ErrInvalidContentType is returned when the content-type is not a JSON body.
Functions ¶
func MatchRegexp ¶ added in v0.23.0
Types ¶
type AddChangedFiles ¶ added in v0.25.0
type AddChangedFiles struct { Enabled bool `json:"enabled,omitempty"` PersonalAccessToken *triggersv1.SecretRef `json:"personalAccessToken,omitempty"` }
type CheckType ¶ added in v0.25.0
type CheckType string
const ( // Set the checkType to orgMembers to allow org members to submit or comment on PR to proceed OrgMembers CheckType = "orgMembers" // Set the checkType to repoMembers to allow repo members to submit or comment on PR to proceed RepoMembers CheckType = "repoMembers" // Set the checkType to all if both repo members or org members can submit or comment on PR to proceed All CheckType = "all" // Set the checkType to none if neither of repo members or org members can not submit or comment on PR to proceed None CheckType = "none" )
type InterceptorImpl ¶ added in v0.25.0
type InterceptorImpl struct {
SecretGetter interceptors.SecretGetter
}
func NewInterceptor ¶
func NewInterceptor(sg interceptors.SecretGetter) *InterceptorImpl
func (*InterceptorImpl) Process ¶ added in v0.25.0
func (w *InterceptorImpl) Process(ctx context.Context, r *triggersv1.InterceptorRequest) *triggersv1.InterceptorResponse
type InterceptorParams ¶ added in v0.25.0
type InterceptorParams struct { SecretRef *triggersv1.SecretRef `json:"secretRef,omitempty"` // +listType=atomic EventTypes []string `json:"eventTypes,omitempty"` AddChangedFiles AddChangedFiles `json:"addChangedFiles,omitempty"` GithubOwners Owners `json:"githubOwners,omitempty"` }
InterceptorParams provides a webhook to intercept and pre-process events
type Owners ¶ added in v0.25.0
type Owners struct { Enabled bool `json:"enabled,omitempty"` // This param/variable is required for private repos or when checkType is set to orgMembers or repoMembers or all PersonalAccessToken *triggersv1.SecretRef `json:"personalAccessToken,omitempty"` // Set the value to one of the supported values (orgMembers, repoMembers, both, none) CheckType CheckType `json:"checkType,omitempty"` }
type OwnersConfig ¶ added in v0.23.0
Click to show internal directories.
Click to hide internal directories.