Versions in this module Expand all Collapse all v1 v1.0.1 Aug 10, 2024 v1.0.0 Aug 10, 2024 Changes in this version + const ActionClosed + const ActionCreated + const ActionOpened + const ActionReopen + const PRActionChangedSourceBranch + const PRActionOpened + func GetOrgRepo(repo *github.Repository) (string, string) + func IsCommentCreated(e *github.IssueCommentEvent) bool + func IsCommentOnPullRequest(e *github.IssueCommentEvent) bool + func IsIssueOpened(action string) bool + func IsPROpened(action string) bool + func IsPRSourceBranchChanged(action string) bool + func PayloadSignature(payload []byte, key []byte) string + func ValidatePayload(payload []byte, sig string, tokenGenerator func() []byte) bool + func ValidateWebhook(w http.ResponseWriter, r *http.Request, tokenGenerator func() []byte) (eType string, guid string, payload []byte, ok bool, status int) + type Client interface + AddIssueLabel func(is PRInfo, label []string) error + AddPRLabel func(pr PRInfo, label string) error + AddRepoMember func(pr PRInfo, login, permission string) error + AssignPR func(pr PRInfo, logins []string) error + AssignSingleIssue func(is PRInfo, login string) error + CloseIssue func(pr PRInfo) error + ClosePR func(pr PRInfo) error + CreateBranch func(org, repo string, reference *sdk.Reference) error + CreateFile func(org, repo, path, branch, commitMSG, sha string, content []byte) error + CreateIssue func(org, repo string, request *sdk.IssueRequest) (*sdk.Issue, error) + CreateIssueComment func(is PRInfo, comment string) error + CreatePRComment func(pr PRInfo, comment string) error + CreateRepo func(org string, r *sdk.Repository) error + CreateRepoLabel func(org, repo, label string) error + DeletePRComment func(org, repo string, ID int64) error + GetDirectoryTree func(org, repo, branch string, recursive bool) ([]*sdk.TreeEntry, error) + GetEnterprisesMember func(org string) ([]*sdk.User, error) + GetIssueLabels func(is PRInfo) ([]string, error) + GetPRComments func(pr PRInfo) ([]*sdk.IssueComment, error) + GetPRCommits func(pr PRInfo) ([]*sdk.RepositoryCommit, error) + GetPRLabels func(pr PRInfo) ([]string, error) + GetPathContent func(org, repo, path, branch string) (*sdk.RepositoryContent, error) + GetPullRequestChanges func(pr PRInfo) ([]*sdk.CommitFile, error) + GetPullRequests func(pr PRInfo) ([]*sdk.PullRequest, error) + GetRef func(org, repo, ref string) (*sdk.Reference, error) + GetRepo func(org, repo string) (*sdk.Repository, error) + GetRepoLabels func(org, repo string) ([]string, error) + GetRepos func(org string) ([]*sdk.Repository, error) + GetRepositoryLabels func(pr PRInfo) ([]string, error) + GetSingleIssue func(is PRInfo) (*sdk.Issue, error) + GetSinglePR func(org, repo string, number int) (*sdk.PullRequest, error) + GetUserPermissionOfRepo func(org, repo, user string) (*sdk.RepositoryPermissionLevel, error) + IsCollaborator func(pr PRInfo, login string) (bool, error) + ListBranches func(org, repo string) ([]*sdk.Branch, error) + ListCollaborator func(pr PRInfo) ([]*sdk.User, error) + ListIssueComments func(is PRInfo) ([]*sdk.IssueComment, error) + ListOperationLogs func(pr PRInfo) ([]*sdk.Timeline, error) + MergePR func(pr PRInfo, commitMessage string, opt *sdk.PullRequestOptions) error + RemoveIssueLabel func(is PRInfo, label string) error + RemovePRLabel func(pr PRInfo, label string) error + RemoveProtectionBranch func(org, repo, branch string) error + RemoveRepoMember func(pr PRInfo, login string) error + ReopenIssue func(pr PRInfo) error + ReopenPR func(pr PRInfo) error + SetProtectionBranch func(org, repo, branch string, pre *sdk.ProtectionRequest) error + UnAssignPR func(pr PRInfo, logins []string) error + UnAssignSingleIssue func(is PRInfo, login string) error + UpdateIssue func(is PRInfo, iss *sdk.IssueRequest) error + UpdateIssueComment func(is PRInfo, commentID int64, c *sdk.IssueComment) error + UpdatePR func(pr PRInfo, request *sdk.PullRequest) (*sdk.PullRequest, error) + UpdatePRComment func(pr PRInfo, commentID int64, ic *sdk.IssueComment) error + UpdateRepo func(org, repo string, r *sdk.Repository) error + func NewClient(getToken func() []byte) Client + type IssuePRInfo interface + GetAuthor func() string + GetLabels func() sets.String + GetNumber func() int + GetOrgRepo func() (string, string) + func GenIssuePRInfo(e interface{}) IssuePRInfo + type PRInfo struct + Number int + Org string + Repo string + func (p PRInfo) String() string