Versions in this module Expand all Collapse all v0 v0.0.2 Oct 7, 2021 v0.0.1 Sep 30, 2021 Changes in this version + func HashPayload(secret string, payloadBody []byte) string + func IsValidPayload(secret, headerHash string, payload []byte) bool + func Validate(secret, headerHash string, payload []byte) error + type BranchResponse struct + Commit struct{ ... } + Name string + type Client struct + GitAPIURL string + GitRepository string + GitToken string + GitWebhookSecret string + K8sClient client.Client + func (c *Client) CanUserWriteToRepo(user git.User) (bool, error) + func (c *Client) DeleteLabel(_ git.IssueType, id int, label string) error + func (c *Client) DeleteWebhook(id int) error + func (c *Client) GetBranch(branch string) (*git.Branch, error) + func (c *Client) GetPullRequest(id int) (*git.PullRequest, error) + func (c *Client) GetPullRequestDiff(id int) (*git.Diff, error) + func (c *Client) GetUserInfo(userName string) (*git.User, error) + func (c *Client) Init() error + func (c *Client) ListCommitStatuses(ref string) ([]git.CommitStatus, error) + func (c *Client) ListPullRequestCommits(id int) ([]git.Commit, error) + func (c *Client) ListPullRequests(onlyOpen bool) ([]git.PullRequest, error) + func (c *Client) ListWebhook() ([]git.WebhookEntry, error) + func (c *Client) MergePullRequest(id int, sha string, method git.MergeMethod, message string) error + func (c *Client) ParseWebhook(header http.Header, jsonString []byte) (*git.Webhook, error) + func (c *Client) RegisterComment(_ git.IssueType, issueNo int, body string) error + func (c *Client) RegisterWebhook(url string) error + func (c *Client) SetCommitStatus(sha string, status git.CommitStatus) error + func (c *Client) SetLabel(_ git.IssueType, id int, label string) error + type Comment struct + Body string + CreatedAt *metav1.Time + UpdatedAt *metav1.Time + User User + type CommentBody struct + Body string + type CommitResponse struct + Commit struct{ ... } + SHA string + type CommitStatusRequest struct + Context string + Description string + State string + TargetURL string + type CommitStatusResponse struct + Context string + Description string + State string + TargetURL string + type DiffFile struct + Additions int + Changes int + Deletions int + Filename string + PrevFilename string + type DiffFiles []DiffFile + type IssueCommentWebhook struct + Action string + Comment Comment + Issue struct{ ... } + Repo Repo + Sender User + type LabelBody struct + Name string + type MergeRequest struct + CommitMessage string + CommitTitle string + MergeMethod string + Sha string + type PullRequest struct + Base struct{ ... } + Draft bool + Head struct{ ... } + Labels []struct{ ... } + Mergeable bool + Number int + State string + Title string + URL string + User User + type PullRequestReviewCommentWebhook struct + Action string + Comment Comment + PullRequest PullRequest + Repo Repo + Sender User + type PullRequestReviewWebhook struct + Action string + PullRequest PullRequest + Repo Repo + Review struct{ ... } + Sender User + type PullRequestWebhook struct + Action string + Label LabelBody + Number int + PullRequest PullRequest + Repo Repo + Sender User + type PushWebhook struct + Ref string + Repo Repo + Sender User + Sha string + type RegistrationWebhookBody struct + Active bool + Config RegistrationWebhookBodyConfig + Events []string + Name string + type RegistrationWebhookBodyConfig struct + ContentType string + InsecureSsl string + Secret string + URL string + type Repo struct + Name string + Owner struct{ ... } + Private bool + URL string + type User struct + ID int + Name string + type UserInfo struct + Email string + ID int + UserName string + type UserPermission struct + Permission string + type WebhookEntry struct + Config struct{ ... } + ID int