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 + const CommitStatusStateError + const CommitStatusStateFailure + const CommitStatusStatePending + const CommitStatusStateSuccess + const EventTypeIssueComment + const EventTypePullRequest + const EventTypePullRequestReview + const EventTypePullRequestReviewComment + const EventTypePush + const FakeSha + const IssueTypeIssue + const IssueTypePullRequest + const MergeMethodMerge + const MergeMethodSquash + const PullRequestActionClose + const PullRequestActionLabeled + const PullRequestActionOpen + const PullRequestActionReOpen + const PullRequestActionSynchronize + const PullRequestActionUnlabeled + const PullRequestReviewStateApproved + const PullRequestReviewStateUnapproved + const PullRequestStateClosed + const PullRequestStateOpen + func GetChangedLinesFromDiff(diffString string) (int, int, error) + func GetPaginatedRequest(apiURL string, header map[string]string, newObj func() interface{}, ...) error + func RequestHTTP(method string, uri string, header map[string]string, data interface{}) ([]byte, http.Header, error) + type Base struct + Ref string + Sha string + type Branch struct + CommitID string + Name string + type Change struct + Additions int + Changes int + Deletions int + Filename string + OldFilename string + type Client interface + CanUserWriteToRepo func(user User) (bool, error) + DeleteLabel func(issueType IssueType, id int, label string) error + DeleteWebhook func(id int) error + GetBranch func(branch string) (*Branch, error) + GetPullRequest func(id int) (*PullRequest, error) + GetPullRequestDiff func(id int) (*Diff, error) + GetUserInfo func(user string) (*User, error) + Init func() error + ListCommitStatuses func(ref string) ([]CommitStatus, error) + ListPullRequestCommits func(id int) ([]Commit, error) + ListPullRequests func(onlyOpen bool) ([]PullRequest, error) + ListWebhook func() ([]WebhookEntry, error) + MergePullRequest func(id int, sha string, method MergeMethod, message string) error + ParseWebhook func(http.Header, []byte) (*Webhook, error) + RegisterComment func(issueType IssueType, issueNo int, body string) error + RegisterWebhook func(url string) error + SetCommitStatus func(sha string, status CommitStatus) error + SetLabel func(issueType IssueType, id int, label string) error + type Comment struct + Body string + CreatedAt *metav1.Time + type Commit struct + Author User + Committer User + Message string + SHA string + type CommitStatus struct + Context string + Description string + State CommitStatusState + TargetURL string + type CommitStatusState string + type Diff struct + Changes []Change + type EventType string + type Head struct + Ref string + Sha string + type Issue struct + PullRequest *PullRequest + type IssueComment struct + Author User + Comment Comment + Issue Issue + ReviewState PullRequestReviewState + type IssueLabel struct + Name string + type IssueType string + type LinkHeader []LinkHeaderEntry + func ParseLinkHeader(h string) LinkHeader + func (l LinkHeader) Find(rel string) *LinkHeaderEntry + type LinkHeaderEntry struct + Rel string + URL string + type MergeMethod string + type PullRequest struct + Action PullRequestAction + Author User + Base Base + Head Head + ID int + LabelChanged []IssueLabel + Labels []IssueLabel + Mergeable bool + State PullRequestState + Title string + URL string + type PullRequestAction string + type PullRequestReviewState string + type PullRequestState string + type Push struct + Ref string + Sha string + type Repository struct + Name string + URL string + type UnauthorizedError struct + Repo string + User string + func (e *UnauthorizedError) Error() string + type User struct + Email string + ID int + Name string + type Webhook struct + EventType EventType + IssueComment *IssueComment + PullRequest *PullRequest + Push *Push + Repo Repository + Sender User + type WebhookEntry struct + ID int + URL string