Documentation
¶
Index ¶
- Constants
- func ContainsPipelineRecheck(s string) bool
- func ConvertRepositoryPath(repo string) string
- func GetCodebaseByRepoPath(ctx context.Context, client ctrlClient.Reader, ns, repoPath string) (*codebaseApi.Codebase, error)
- type EventInfo
- type GerritEvent
- type GitLabComment
- type GitLabCommentEvent
- type GitLabCommit
- type GitLabMergeRequest
- type GitLabMergeRequestsEvent
- type GitLabProject
- type Processor
- type PullRequest
Constants ¶
View Source
const ( GitProviderGitHub = "github" GitProviderGitLab = "gitlab" GitProviderGerrit = "gerrit" GerritEventTypeCommentAdded = "comment-added" GitHubEventTypeCommentAdded = "issue_comment" GitLabEventTypeCommentAdded = "Note Hook" EventTypeReviewComment = "comment" EventTypeMerge = "merge" )
View Source
const (
CodebaseListLimit = 1000
)
Variables ¶
This section is empty.
Functions ¶
func ContainsPipelineRecheck ¶ added in v0.12.0
func ConvertRepositoryPath ¶ added in v0.12.0
ConvertRepositoryPath converts repository path to the format which is used in codebase.
func GetCodebaseByRepoPath ¶ added in v0.12.0
func GetCodebaseByRepoPath(ctx context.Context, client ctrlClient.Reader, ns, repoPath string) (*codebaseApi.Codebase, error)
GetCodebaseByRepoPath returns codebase by repository path.
Types ¶
type EventInfo ¶
type EventInfo struct {
GitProvider string
RepoPath string
TargetBranch string
Type string
Codebase *codebaseApi.Codebase
HasPipelineRecheck bool
PullRequest *PullRequest
}
EventInfo represents information about an event.
func (*EventInfo) IsReviewCommentEvent ¶
IsReviewCommentEvent returns true if the event is a review comment event.
type GerritEvent ¶
type GerritEvent struct {
Project struct {
Name string `json:"name"`
} `json:"project"`
Change struct {
Branch string `json:"branch"`
} `json:"change"`
Comment string `json:"comment"`
Type string `json:"type"`
}
GerritEvent represents a Gerrit event.
type GitLabComment ¶
type GitLabComment struct {
Note string `json:"note"`
}
type GitLabCommentEvent ¶
type GitLabCommentEvent struct {
Project GitLabProject `json:"project"`
MergeRequest GitLabMergeRequest `json:"merge_request"`
ObjectAttributes GitLabComment `json:"object_attributes"`
}
GitLabCommentEvent represents GitLab comment event.
type GitLabCommit ¶
type GitLabMergeRequest ¶
type GitLabMergeRequest struct {
TargetBranch string `json:"target_branch"`
Title string `json:"title"`
LastCommit GitLabCommit `json:"last_commit"`
SourceBranch string `json:"source_branch"`
ChangeNumber int `json:"iid"`
}
type GitLabMergeRequestsEvent ¶
type GitLabMergeRequestsEvent struct {
Project GitLabProject `json:"project"`
ObjectAttributes GitLabMergeRequest `json:"object_attributes"`
}
GitLabMergeRequestsEvent represents GitLab merge request event.
type GitLabProject ¶
type GitLabProject struct {
PathWithNamespace string `json:"path_with_namespace"`
}
Click to show internal directories.
Click to hide internal directories.