Versions in this module Expand all Collapse all v0 v0.0.5 Sep 7, 2018 v0.0.4 Sep 7, 2018 v0.0.3 Sep 7, 2018 v0.0.2 Sep 7, 2018 v0.0.1 Sep 7, 2018 Changes in this version + const Approve + const Comment + const EventGUID + const GenericCommentActionCreated + const GenericCommentActionDeleted + const GenericCommentActionEdited + const IssueActionAssigned + const IssueActionClosed + const IssueActionDemilestoned + const IssueActionEdited + const IssueActionLabeled + const IssueActionMilestoned + const IssueActionOpened + const IssueActionReopened + const IssueActionUnassigned + const IssueActionUnlabeled + const IssueCommentActionCreated + const IssueCommentActionDeleted + const IssueCommentActionEdited + const OrgLogField + const PrLogField + const PrivacyClosed + const PrivacySecret + const PullRequestActionAssigned + const PullRequestActionClosed + const PullRequestActionEdited + const PullRequestActionLabeled + const PullRequestActionOpened + const PullRequestActionReopened + const PullRequestActionReviewRequestRemoved + const PullRequestActionReviewRequested + const PullRequestActionSynchronize + const PullRequestActionUnassigned + const PullRequestActionUnlabeled + const PullRequestFileAdded + const PullRequestFileModified + const PullRequestFileRemoved + const PullRequestFileRenamed + const ReactionConfused + const ReactionHeart + const ReactionHooray + const ReactionLaugh + const ReactionThumbsDown + const ReactionThumbsUp + const RepoLogField + const RequestChanges + const ReviewActionDismissed + const ReviewActionEdited + const ReviewActionSubmitted + const ReviewCommentActionCreated + const ReviewCommentActionDeleted + const ReviewCommentActionEdited + const ReviewStateApproved + const ReviewStateChangesRequested + const ReviewStateCommented + const ReviewStateDismissed + const ReviewStatePending + const RoleAdmin + const RoleAll + const RoleMaintainer + const RoleMember + const StateActive + const StatePending + const StatusError + const StatusFailure + const StatusPending + const StatusSuccess + var NormLogin = strings.ToLower + func HasLabel(label string, issueLabels []Label) bool + func ImageTooBig(url string) (bool, error) + func PayloadSignature(payload []byte, key []byte) string + func ValidatePayload(payload []byte, sig string, key []byte) bool + type Branch struct + Name string + Protected bool + type BranchProtectionRequest struct + EnforceAdmins *bool + RequiredPullRequestReviews *RequiredPullRequestReviews + RequiredStatusChecks *RequiredStatusChecks + Restrictions *Restrictions + type Client struct + func NewClient(getToken func() []byte, bases ...string) *Client + func NewDryRunClient(getToken func() []byte, bases ...string) *Client + func NewFakeClient() *Client + func (c *Client) AddLabel(org, repo string, number int, label string) error + func (c *Client) AddRepoLabel(org, repo, label, description, color string) error + func (c *Client) AssignIssue(org, repo string, number int, logins []string) error + func (c *Client) BotName() (string, error) + func (c *Client) ClearMilestone(org, repo string, num int) error + func (c *Client) CloseIssue(org, repo string, number int) error + func (c *Client) ClosePR(org, repo string, number int) error + func (c *Client) CreateComment(org, repo string, number int, comment string) error + func (c *Client) CreateCommentReaction(org, repo string, id int, reaction string) error + func (c *Client) CreateFork(owner, repo string) error + func (c *Client) CreateIssueReaction(org, repo string, id int, reaction string) error + func (c *Client) CreatePullRequest(org, repo, title, body, head, base string, canModify bool) (int, error) + func (c *Client) CreateReview(org, repo string, number int, r DraftReview) error + func (c *Client) CreateStatus(org, repo, sha string, s Status) error + func (c *Client) CreateTeam(org string, team Team) (*Team, error) + func (c *Client) DeleteComment(org, repo string, id int) error + func (c *Client) DeleteRepoLabel(org, repo, label string) error + func (c *Client) DeleteStaleComments(org, repo string, number int, comments []IssueComment, ...) error + func (c *Client) DeleteTeam(id int) error + func (c *Client) EditComment(org, repo string, id int, comment string) error + func (c *Client) EditOrg(name string, config Organization) (*Organization, error) + func (c *Client) EditTeam(t Team) (*Team, error) + func (c *Client) Email() (string, error) + func (c *Client) FindIssues(query, sort string, asc bool) ([]Issue, error) + func (c *Client) GetBranches(org, repo string, onlyProtected bool) ([]Branch, error) + func (c *Client) GetCombinedStatus(org, repo, ref string) (*CombinedStatus, error) + func (c *Client) GetFile(org, repo, filepath, commit string) ([]byte, error) + func (c *Client) GetIssueLabels(org, repo string, number int) ([]Label, error) + func (c *Client) GetOrg(name string) (*Organization, error) + func (c *Client) GetPullRequest(org, repo string, number int) (*PullRequest, error) + func (c *Client) GetPullRequestChanges(org, repo string, number int) ([]PullRequestChange, error) + func (c *Client) GetPullRequestPatch(org, repo string, number int) ([]byte, error) + func (c *Client) GetRef(org, repo, ref string) (string, error) + func (c *Client) GetRepo(owner, name string) (Repo, error) + func (c *Client) GetRepoLabels(org, repo string) ([]Label, error) + func (c *Client) GetRepos(org string, isUser bool) ([]Repo, error) + func (c *Client) GetUserPermission(org, repo, user string) (string, error) + func (c *Client) HasPermission(org, repo, user string, roles ...string) (bool, error) + func (c *Client) IsCollaborator(org, repo, user string) (bool, error) + func (c *Client) IsMember(org, user string) (bool, error) + func (c *Client) IsMergeable(org, repo string, number int, sha string) (bool, error) + func (c *Client) ListCollaborators(org, repo string) ([]User, error) + func (c *Client) ListIssueComments(org, repo string, number int) ([]IssueComment, error) + func (c *Client) ListIssueEvents(org, repo string, num int) ([]ListedIssueEvent, error) + func (c *Client) ListMilestones(org, repo string) ([]Milestone, error) + func (c *Client) ListOrgInvitations(org string) ([]OrgInvitation, error) + func (c *Client) ListOrgMembers(org, role string) ([]TeamMember, error) + func (c *Client) ListPullRequestComments(org, repo string, number int) ([]ReviewComment, error) + func (c *Client) ListReviews(org, repo string, number int) ([]Review, error) + func (c *Client) ListStatuses(org, repo, ref string) ([]Status, error) + func (c *Client) ListTeamMembers(id int, role string) ([]TeamMember, error) + func (c *Client) ListTeams(org string) ([]Team, error) + func (c *Client) Merge(org, repo string, pr int, details MergeDetails) error + func (c *Client) Query(ctx context.Context, q interface{}, vars map[string]interface{}) error + func (c *Client) RemoveBranchProtection(org, repo, branch string) error + func (c *Client) RemoveLabel(org, repo string, number int, label string) error + func (c *Client) RemoveOrgMembership(org, user string) error + func (c *Client) RemoveTeamMembership(id int, user string) error + func (c *Client) ReopenIssue(org, repo string, number int) error + func (c *Client) ReopenPR(org, repo string, number int) error + func (c *Client) RequestReview(org, repo string, number int, logins []string) error + func (c *Client) SetMilestone(org, repo string, issueNum, milestoneNum int) error + func (c *Client) Throttle(hourlyTokens, burst int) + func (c *Client) UnassignIssue(org, repo string, number int, logins []string) error + func (c *Client) UnrequestReview(org, repo string, number int, logins []string) error + func (c *Client) UpdateBranchProtection(org, repo, branch string, config BranchProtectionRequest) error + func (c *Client) UpdateOrgMembership(org, user string, admin bool) (*OrgMembership, error) + func (c *Client) UpdateRepoLabel(org, repo, label, newName, description, color string) error + func (c *Client) UpdateTeamMembership(id int, user string, maintainer bool) (*TeamMembership, error) + type ClientError struct + Errors []struct{ ... } + Message string + type CombinedStatus struct + Statuses []Status + type Commit struct + Added []string + ID string + Message string + Modified []string + Removed []string + type Content struct + Content string + SHA string + type DraftReview struct + Action ReviewAction + Body string + Comments []DraftReviewComment + CommitSHA string + type DraftReviewComment struct + Body string + Path string + Position int + type ExtraUsers struct + Users []string + func (e ExtraUsers) Error() string + type FileNotFound struct + func (e *FileNotFound) Error() string + type GenericCommentEvent struct + Action GenericCommentEventAction + Assignees []User + Body string + GUID string + HTMLURL string + IsPR bool + IssueAuthor User + IssueBody string + IssueHTMLURL string + IssueState string + Number int + Repo Repo + User User + type GenericCommentEventAction string + type Issue struct + Assignees []User + Body string + CreatedAt time.Time + HTMLURL string + Labels []Label + Milestone Milestone + Number int + PullRequest *struct{} + State string + Title string + UpdatedAt time.Time + User User + func (i Issue) HasLabel(labelToFind string) bool + func (i Issue) IsAssignee(login string) bool + func (i Issue) IsAuthor(login string) bool + func (i Issue) IsPullRequest() bool + type IssueComment struct + Body string + CreatedAt time.Time + HTMLURL string + ID int + UpdatedAt time.Time + User User + type IssueCommentEvent struct + Action IssueCommentEventAction + Comment IssueComment + GUID string + Issue Issue + Repo Repo + type IssueCommentEventAction string + type IssueEvent struct + Action IssueEventAction + GUID string + Issue Issue + Label Label + Repo Repo + type IssueEventAction string + type IssuesSearchResult struct + Issues []Issue + Total int + type Label struct + Color string + Description string + Name string + URL string + type LabelNotFound struct + Label string + Number int + Owner string + Repo string + func (e *LabelNotFound) Error() string + type ListedIssueEvent struct + Actor User + CreatedAt time.Time + Event IssueEventAction + Label Label + type Membership struct + Role string + State string + type MergeDetails struct + CommitMessage string + CommitTitle string + MergeMethod string + SHA string + type Milestone struct + Number int + Title string + type MissingUsers struct + Users []string + func (m MissingUsers) Error() string + type ModifiedHeadError string + func (e ModifiedHeadError) Error() string + type OrgInvitation struct + Inviter TeamMember + type OrgMembership struct + type Organization struct + BillingEmail string + Company string + DefaultRepositoryPermission string + Description string + Email string + HasOrganizationProjects bool + HasRepositoryProjects bool + Location string + MembersCanCreateRepositories bool + Name string + type PullRequest struct + Assignees []User + Base PullRequestBranch + Body string + CreatedAt time.Time + HTMLURL string + Head PullRequestBranch + Mergable *bool + MergeSHA *string + Merged bool + Number int + RequestedReviewers []User + State string + Title string + UpdatedAt time.Time + User User + type PullRequestBranch struct + Ref string + Repo Repo + SHA string + type PullRequestChange struct + Additions int + BlobURL string + Changes int + Deletions int + Filename string + Patch string + SHA string + Status string + type PullRequestEvent struct + Action PullRequestEventAction + Changes json.RawMessage + GUID string + Label Label + Number int + PullRequest PullRequest + Repo Repo + Sender User + type PullRequestEventAction string + type PullRequestFileStatus string + type PullRequestMergeType string + const MergeMerge + const MergeRebase + const MergeSquash + type PushEvent struct + After string + Before string + Commits []Commit + Compare string + GUID string + Pusher User + Ref string + Repo Repo + Sender User + func (pe PushEvent) Branch() string + type Reaction struct + Content string + type Repo struct + DefaultBranch string + Fork bool + FullName string + HTMLURL string + Name string + Owner User + type RequiredPullRequestReviews struct + DismissStaleReviews bool + DismissalRestrictions Restrictions + RequireCodeOwnerReviews bool + RequiredApprovingReviewCount int + type RequiredStatusChecks struct + Contexts []string + Strict bool + type Restrictions struct + Teams *[]string + Users *[]string + type Review struct + Body string + HTMLURL string + ID int + State ReviewState + SubmittedAt time.Time + User User + type ReviewAction string + type ReviewComment struct + Body string + CreatedAt time.Time + HTMLURL string + ID int + Path string + Position *int + ReviewID int + UpdatedAt time.Time + User User + type ReviewCommentEvent struct + Action ReviewCommentEventAction + Comment ReviewComment + GUID string + PullRequest PullRequest + Repo Repo + type ReviewCommentEventAction string + type ReviewEvent struct + Action ReviewEventAction + GUID string + PullRequest PullRequest + Repo Repo + Review Review + type ReviewEventAction string + type ReviewState string + type StateCannotBeChanged struct + Message string + func (s StateCannotBeChanged) Error() string + type Status struct + Context string + Description string + State string + TargetURL string + type StatusEvent struct + Context string + Description string + GUID string + ID int + Name string + Repo Repo + SHA string + Sender User + State string + TargetURL string + type Team struct + Description string + ID int + Name string + Parent *Team + ParentTeamID *int + Privacy string + type TeamMember struct + Login string + type TeamMembership struct + type UnauthorizedToPushError string + func (e UnauthorizedToPushError) Error() string + type UnmergablePRBaseChangedError string + func (e UnmergablePRBaseChangedError) Error() string + type UnmergablePRError string + func (e UnmergablePRError) Error() string + type User struct + Email string + ID int + Login string + Name string