Versions in this module Expand all Collapse all v1 v1.0.0 Jul 13, 2023 Changes in this version + func GenResponseWithReference(e *sdk.NoteEvent, reply string) string + func SortBotComments(c []BotComment) + func ValidateWebhook(w http.ResponseWriter, r *http.Request, tokenGenerator func() string) (eventType string, eventGUID string, payload []byte, status int, ok bool) + type BotComment struct + Body string + CommentID int32 + CreatedAt time.Time + func FindBotComment(allComments []sdk.PullRequestComments, botName string, ...) []BotComment + func (c BotComment) IsAvailable() bool + type Client interface + AddIssueLabel func(org, repo, number, label string) error + AddMultiIssueLabel func(org, repo, number string, label []string) error + AddMultiPRLabel func(org, repo string, number int32, label []string) error + AddPRLabel func(org, repo string, number int32, label string) error + AddProjectLabels func(org, repo string, label []string) error + AddRepoMember func(org, repo, login, permission string) error + AssignGiteeIssue func(org, repo string, number string, login string) error + AssignPR func(owner, repo string, number int32, logins []string) error + CancelProtectionBranch func(org, repo, branch string) error + CloseIssue func(owner, repo string, number string) error + ClosePR func(org, repo string, number int32) error + CreateBranch func(org, repo, branch, parentBranch string) error + CreateFile func(org, repo, branch, path, content, commitMsg string) (sdk.CommitContent, error) + CreateIssue func(org, repo, title, body string) (sdk.Issue, error) + CreateIssueComment func(org, repo string, number string, comment string) error + CreatePRComment func(org, repo string, number int32, comment string) error + CreatePullRequest func(org, repo, title, body, head, base string, canModify bool) (sdk.PullRequest, error) + CreateRepo func(org string, repo sdk.RepositoryPostParam) error + CreateRepoLabel func(org, repo, label, color string) error + DeletePRComment func(org, repo string, ID int32) error + ForkRepo func(org, repo string) (sdk.Project, error) + GetBot func() (sdk.User, error) + GetDirectoryTree func(org, repo, sha string, recursive int32) (sdk.Tree, error) + GetEnterprisesMember func(enterprise, login string) (sdk.EnterpriseMember, error) + GetGiteePullRequest func(org, repo string, number int32) (sdk.PullRequest, error) + GetGiteeRepo func(org, repo string) (sdk.Project, error) + GetIssue func(org, repo, number string) (sdk.Issue, error) + GetIssueLabels func(org, repo, number string) ([]sdk.Label, error) + GetPRCommit func(org, repo, SHA string) (sdk.RepoCommit, error) + GetPRCommits func(org, repo string, number int32) ([]sdk.PullRequestCommits, error) + GetPRLabels func(org, repo string, number int32) ([]sdk.Label, error) + GetPathContent func(org, repo, path, ref string) (sdk.Content, error) + GetPullRequestChanges func(org, repo string, number int32) ([]sdk.PullRequestFiles, error) + GetPullRequests func(org, repo string, opts ListPullRequestOpt) ([]sdk.PullRequest, error) + GetRef func(org, repo, ref string) (string, error) + GetRepo func(org, repo string) (sdk.Project, error) + GetRepoAllBranch func(org, repo string) ([]sdk.Branch, error) + GetRepoLabels func(owner, repo string) ([]sdk.Label, error) + GetRepos func(org string) ([]sdk.Project, error) + GetUserPermissionsOfRepo func(org, repo, login string) (sdk.ProjectMemberPermission, error) + IsCollaborator func(owner, repo, login string) (bool, error) + IsMember func(org, login string) (bool, error) + ListCollaborators func(org, repo string) ([]sdk.ProjectMember, error) + ListIssueComments func(org, repo, number string) ([]sdk.Note, error) + ListOrg func() ([]string, error) + ListPRComments func(org, repo string, number int32) ([]sdk.PullRequestComments, error) + ListPROperationLogs func(org, repo string, number int32) ([]sdk.OperateLog, error) + ListPrIssues func(org, repo string, number int32) ([]sdk.Issue, error) + MergePR func(owner, repo string, number int32, opt sdk.PullRequestMergePutParam) error + PatchFile func(owner, repo, path, branch, content, sha, message string) error + RemoveIssueAssignee func(org, repo string, number string) error + RemoveIssueLabel func(org, repo, number, label string) error + RemoveIssueLabels func(org, repo, number string, label []string) error + RemovePRLabel func(org, repo string, number int32, label string) error + RemovePRLabels func(org, repo string, number int32, labels []string) error + RemoveRepoMember func(org, repo, login string) error + ReopenIssue func(owner, repo string, number string) error + ReplacePRAllLabels func(owner, repo string, number int32, labels []string) error + SetProtectionBranch func(org, repo, branch string) error + SetRepoReviewer func(org, repo string, reviewer sdk.SetRepoReviewer) error + UnassignGiteeIssue func(org, repo string, number string, login string) error + UnassignPR func(owner, repo string, number int32, logins []string) error + UpdateIssue func(owner, number string, param sdk.IssueUpdateParam) (sdk.Issue, error) + UpdateIssueComment func(org, repo string, commentID int32, comment string) error + UpdatePRComment func(org, repo string, commentID int32, comment string) error + UpdateProjectLabels func(org, repo string, label []string) error + UpdatePullRequest func(org, repo string, number int32, param sdk.PullRequestUpdateParam) (sdk.PullRequest, error) + UpdateRepo func(org, repo string, info sdk.RepoPatchParam) error + func NewClient(getToken func() []byte) Client + type ErrorForbidden struct + func (e ErrorForbidden) Error() string + type ListPullRequestOpt struct + Base string + Direction string + Head string + Labels []string + MilestoneNumber int32 + Sort string + State string