Documentation ¶
Index ¶
- Constants
- func CheckForValidChanges(ctx context.Context, changes []*Changes, paths []string, fileTypes []string) bool
- type Changes
- type Client
- func (c *Client) CommitStatus(ctx context.Context, pr vcs.PullRequest, state pkg.CommitState) error
- func (c *Client) CreateHook(ctx context.Context, repoName, webhookUrl, webhookSecret string) error
- func (c *Client) Email() string
- func (c *Client) GetHookByUrl(ctx context.Context, repoName, webhookUrl string) (*vcs.WebHookConfig, error)
- func (c *Client) GetLastPipelinesForCommit(projectName string, commitSHA string) *gitlab.PipelineInfo
- func (c *Client) GetMergeChanges(ctx context.Context, projectId int, mergeReqId int) ([]*Changes, error)
- func (c *Client) GetName() string
- func (c *Client) GetPipelinesForCommit(projectName string, commitSHA string) ([]*gitlab.PipelineInfo, error)
- func (c *Client) GetProjectByID(project int) (*gitlab.Project, error)
- func (c *Client) GetRepoConfigFile(ctx context.Context, projectId int, mergeReqId int) ([]byte, error)
- func (c *Client) LoadHook(ctx context.Context, id string) (vcs.PullRequest, error)
- func (c *Client) ParseHook(r *http.Request, request []byte) (vcs.PullRequest, error)
- func (c *Client) PostMessage(ctx context.Context, pr vcs.PullRequest, message string) *msg.Message
- func (c *Client) TidyOutdatedComments(ctx context.Context, pr vcs.PullRequest) error
- func (c *Client) ToEmoji(s pkg.CommitState) string
- func (c *Client) UpdateMessage(ctx context.Context, m *msg.Message, message string) error
- func (c *Client) Username() string
- func (c *Client) VerifyHook(r *http.Request, secret string) ([]byte, error)
Constants ¶
View Source
const GitlabCommitStatusContext = "kubechecks"
View Source
const GitlabTokenHeader = "X-Gitlab-Token"
View Source
const MaxCommentLength = 1_000_000
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func CreateGitlabClient ¶
func CreateGitlabClient(cfg config.ServerConfig) (*Client, error)
func (*Client) CommitStatus ¶
func (c *Client) CommitStatus(ctx context.Context, pr vcs.PullRequest, state pkg.CommitState) error
func (*Client) CreateHook ¶
func (*Client) GetHookByUrl ¶
func (*Client) GetLastPipelinesForCommit ¶
func (*Client) GetMergeChanges ¶
func (*Client) GetPipelinesForCommit ¶
func (*Client) GetProjectByID ¶
GetProjectByID gets a project by the given Project Name or ID
func (*Client) GetRepoConfigFile ¶
func (*Client) ParseHook ¶
ParseHook parses and validates a webhook event; return an err if this isn't valid
func (*Client) PostMessage ¶
func (*Client) TidyOutdatedComments ¶
func (*Client) ToEmoji ¶ added in v1.4.3
func (c *Client) ToEmoji(s pkg.CommitState) string
ToEmoji returns a string representation of this state for use in the request
func (*Client) UpdateMessage ¶
Click to show internal directories.
Click to hide internal directories.