# Functions
Bool is a helper routine that allocates a new bool value to store v and returns a pointer to it.
CheckResponse checks the API response for errors, and returns them if present.
DeliveryID returns the unique delivery ID of webhook request r.
Int is a helper routine that allocates a new int value to store v and returns a pointer to it.
Int64 is a helper routine that allocates a new int64 value to store v and returns a pointer to it.
NewClient returns a new GitHub API client.
NewEnterpriseClient returns a new GitHub API client with provided base URL and upload URL (often the same URL).
ParseWebHook parses the event payload.
String is a helper routine that allocates a new string value to store v and returns a pointer to it.
Stringify attempts to create a reasonable string representation of types in the GitHub library.
ValidatePayload validates an incoming GitHub Webhook event request and returns the (JSON) payload.
ValidateSignature validates the signature for the given payload.
WebHookType returns the event type of webhook request r.
# Constants
Diff format.
Patch format.
This is the set of scopes for GitHub API V3.
This is the set of scopes for GitHub API V3.
This is the set of scopes for GitHub API V3.
This is the set of scopes for GitHub API V3.
This is the set of scopes for GitHub API V3.
This is the set of scopes for GitHub API V3.
This is the set of scopes for GitHub API V3.
REVISIT: is this actually returned, or just a documentation artifact?.
This is the set of scopes for GitHub API V3.
This is the set of scopes for GitHub API V3.
This is the set of scopes for GitHub API V3.
This is the set of scopes for GitHub API V3.
This is the set of scopes for GitHub API V3.
This is the set of scopes for GitHub API V3.
This is the set of scopes for GitHub API V3.
This is the set of scopes for GitHub API V3.
This is the set of scopes for GitHub API V3.
This is the set of scopes for GitHub API V3.
This is the set of scopes for GitHub API V3.
This is the set of scopes for GitHub API V3.
This is the set of scopes for GitHub API V3.
This is the set of scopes for GitHub API V3.
This is the set of scopes for GitHub API V3.
This is the set of scopes for GitHub API V3.
Tarball specifies an archive in gzipped tar format.
Zipball specifies an archive in zip format.
# Structs
AbuseRateLimitError occurs when GitHub returns 403 Forbidden response with the "documentation_url" field value equal to "https://developer.github.com/v3/#abuse-rate-limits".
AcceptedError occurs when GitHub returns 202 Accepted response with an empty body, which means a job was scheduled on the GitHub side to process the information needed and cache it.
ActivityListStarredOptions specifies the optional parameters to the ActivityService.ListStarred method.
AdminEnforcement represents the configuration to enforce required status checks for repository administrators.
AdminStats represents a variety of stats of a Github Enterprise installation.
APIMeta represents metadata about the GitHub API.
App represents a GitHub App.
Attachment represents a GitHub Apps attachment.
Authorization represents an individual GitHub authorization.
AuthorizationApp represents an individual GitHub app (in the context of authorization).
AuthorizationRequest represents a request to create an authorization.
AuthorizationUpdateRequest represents a request to update an authorization.
AutoTriggerCheck enables or disables automatic creation of CheckSuite events upon pushes to the repository.
BasicAuthTransport is an http.RoundTripper that authenticates all requests using HTTP Basic Authentication with the provided username and password.
Blob represents a blob object.
Branch represents a repository branch.
BranchCommit is the result of listing branches with commit SHA.
BranchRestrictions represents the restriction that only certain users or teams may push to a branch.
BranchRestrictionsRequest represents the request to create/edit the restriction that only certain users or teams may push to a branch.
CheckRun represents a GitHub check run on a repository associated with a GitHub app.
CheckRunAction exposes further actions the integrator can perform, which a user may trigger.
CheckRunAnnotation represents an annotation object for a CheckRun output.
CheckRunEvent is triggered when a check run is "created", "updated", or "rerequested".
CheckRunImage represents an image object for a CheckRun output.
CheckRunOutput represents the output of a CheckRun.
CheckSuite represents a suite of check runs.
CheckSuiteEvent is triggered when a check suite is "completed", "requested", or "rerequested".
CheckSuitePreferenceOptions set options for check suite preferences for a repository.
CheckSuitePreferenceResults represents the results of the preference set operation.
A Client manages communication with the GitHub API.
CodeOfConduct represents a code of conduct.
CodeResult represents a single search result.
CodeSearchResult represents the result of a code search.
CombinedStatus represents the combined status of a repository at a particular reference.
CommentStats represents the number of total comments on commits, gists, issues and pull requests.
Commit represents a GitHub commit.
CommitAuthor represents the author or committer of a commit.
CommitCommentEvent is triggered when a commit comment is created.
CommitFile represents a file modified in a commit.
CommitResult represents a commit object as returned in commit search endpoint response.
CommitsComparison is the result of comparing two commits.
CommitsListOptions specifies the optional parameters to the RepositoriesService.ListCommits method.
CommitsSearchResult represents the result of a commits search.
CommitStats represents the number of additions / deletions from a file in a given RepositoryCommit or GistCommit.
CommunityHealthFiles represents the different files in the community health metrics response.
CommunityHealthMetrics represents a response containing the community metrics of a repository.
Contributor represents a repository contributor.
ContributorStats represents a contributor to a repository and their weekly contributions to a given repo.
CreateCheckRunOptions sets up parameters needed to create a CheckRun.
CreateCheckSuiteOptions sets up parameters to manually create a check suites.
CreateEvent represents a created repository, branch, or tag.
CreateOrgInvitationOptions specifies the parameters to the OrganizationService.Invite method.
DeleteEvent represents a deleted branch or tag.
DeployKeyEvent is triggered when a deploy key is added or removed from a repository.
Deployment represents a deployment in a repo.
DeploymentEvent represents a deployment.
DeploymentRequest represents a deployment request.
DeploymentsListOptions specifies the optional parameters to the RepositoriesService.ListDeployments method.
DeploymentStatus represents the status of a particular deployment.
DeploymentStatusEvent represents a deployment status.
DeploymentStatusRequest represents a deployment request.
DiscussionComment represents a GitHub dicussion in a team.
DiscussionCommentListOptions specifies optional parameters to the TeamServices.ListComments method.
DiscussionListOptions specifies optional parameters to the TeamServices.ListDiscussions method.
DismissalRestrictions specifies which users and teams can dismiss pull request reviews.
DismissalRestrictionsRequest represents the request to create/edit the restriction to allows only specific users or teams to dimiss pull request reviews.
DismissedReview represents details for 'dismissed_review' events.
DraftReviewComment represents a comment part of the review.
EditChange represents the changes when an issue, pull request, or comment has been edited.
An Error reports more details on an individual error in an ErrorResponse.
An ErrorResponse reports one or more errors caused by an API request.
Event represents a GitHub event.
FeedLink represents a link to a related resource.
Feeds represents timeline resources in Atom format.
ForkEvent is triggered when a user forks a repository.
Gist represents a GitHub's gist.
GistComment represents a Gist comment.
GistCommit represents a commit on a gist.
GistFile represents a file on a gist.
GistFork represents a fork of a gist.
GistListOptions specifies the optional parameters to the GistsService.List, GistsService.ListAll, and GistsService.ListStarred methods.
GistStats represents the number of total, private and public gists.
GitHubAppAuthorizationEvent is triggered when a user's authorization for a GitHub Application is revoked.
Gitignore represents a .gitignore file as returned by the GitHub API.
GitObject represents a Git object.
GollumEvent is triggered when a Wiki page is created or updated.
GPGEmail represents an email address associated to a GPG key.
GPGKey represents a GitHub user's public GPG key used to verify GPG signed commits and tags.
Grant represents an OAuth application that has been granted access to an account.
Hook represents a GitHub (web and service) hook for a repository.
HookStats represents the number of total, active and inactive hooks.
Hovercard represents hovercard information about a user.
HovercardOptions specifies optional parameters to the UsersService.GetHovercard method.
Import represents a repository import request.
Installation represents a GitHub Apps installation.
InstallationEvent is triggered when a GitHub App has been installed or uninstalled.
InstallationPermissions lists the repository and organization permissions for an installation.
InstallationRepositoriesEvent is triggered when a repository is added or removed from an installation.
InstallationToken represents an installation token.
InteractionRestriction represents the interaction restrictions for repository and organization.
Invitation represents a team member's invitation status.
Issue represents a GitHub issue on a repository.
IssueComment represents a comment left on an issue.
IssueCommentEvent is triggered when an issue comment is created on an issue or pull request.
IssueEvent represents an event that occurred around an Issue or Pull Request.
IssueListByRepoOptions specifies the optional parameters to the IssuesService.ListByRepo method.
IssueListCommentsOptions specifies the optional parameters to the IssuesService.ListComments method.
IssueListOptions specifies the optional parameters to the IssuesService.List and IssuesService.ListByOrg methods.
IssueRequest represents a request to create/edit an issue.
IssuesEvent is triggered when an issue is opened, edited, deleted, transferred, pinned, unpinned, closed, reopened, assigned, unassigned, labeled, unlabeled, locked, unlocked, milestoned, or demilestoned.
IssuesSearchResult represents the result of an issues search.
IssueStats represents the number of total, open and closed issues.
Key represents a public SSH key used to authenticate a user or deploy script.
Label represents a GitHub label on an Issue.
LabelEvent is triggered when a repository's label is created, edited, or deleted.
LabelResult represents a single search result.
LabelsSearchResult represents the result of a code search.
LargeFile identifies a file larger than 100MB found during a repository import.
License represents an open source license.
ListCheckRunsOptions represents parameters to list check runs.
ListCheckRunsResults represents the result of a check run list.
ListCheckSuiteOptions represents parameters to list check suites.
ListCheckSuiteResults represents the result of a check run list.
ListCollaboratorOptions specifies the optional parameters to the ProjectsService.ListProjectCollaborators method.
ListCollaboratorsOptions specifies the optional parameters to the RepositoriesService.ListCollaborators method.
ListContributorsOptions specifies the optional parameters to the RepositoriesService.ListContributors method.
ListMembersOptions specifies optional parameters to the OrganizationsService.ListMembers method.
ListOptions specifies the optional parameters to various List methods that support pagination.
ListOrgMembershipsOptions specifies optional parameters to the OrganizationsService.ListOrgMemberships method.
ListOutsideCollaboratorsOptions specifies optional parameters to the OrganizationsService.ListOutsideCollaborators method.
LockIssueOptions specifies the optional parameters to the IssuesService.Lock method.
MarkdownOptions specifies optional parameters to the Markdown method.
MarketplacePendingChange represents a pending change to a GitHub Apps Marketplace Plan.
MarketplacePlan represents a GitHub Apps Marketplace Listing Plan.
MarketplacePlanAccount represents a GitHub Account (user or organization) on a specific plan.
MarketplacePurchase represents a GitHub Apps Marketplace Purchase.
MarketplacePurchaseEvent is triggered when a user purchases, cancels, or changes their GitHub Marketplace plan.
MarketplaceService handles communication with the marketplace related methods of the GitHub API.
Match represents a single text match.
MemberEvent is triggered when a user is added as a collaborator to a repository.
Membership represents the status of a user's membership in an organization or team.
MembershipEvent is triggered when a user is added or removed from a team.
MetaEvent is triggered when the webhook that this event is configured on is deleted.
Metric represents the different fields for one file in community health files.
Migration represents a GitHub migration (archival).
MigrationOptions specifies the optional parameters to Migration methods.
Milestone represents a GitHub repository milestone.
MilestoneEvent is triggered when a milestone is created, closed, opened, edited, or deleted.
MilestoneListOptions specifies the optional parameters to the IssuesService.ListMilestones method.
MilestoneStats represents the number of total, open and close milestones.
NewPullRequest represents a new pull request to be created.
NewTeam represents a team to be created or modified.
Notification identifies a GitHub notification for a user.
NotificationListOptions specifies the optional parameters to the ActivityService.ListNotifications method.
NotificationSubject identifies the subject of a notification.
Organization represents a GitHub organization account.
OrganizationEvent is triggered when an organization is deleted and renamed, and when a user is added, removed, or invited to an organization.
OrganizationsListOptions specifies the optional parameters to the OrganizationsService.ListAll method.
OrgBlockEvent is triggered when an organization blocks or unblocks a user.
OrgStats represents the number of total, disabled organizations and the team and team member count.
Page represents a single Wiki page.
PageBuildEvent represents an attempted build of a GitHub Pages site, whether successful or not.
Pages represents a GitHub Pages site configuration.
PagesBuild represents the build information for a GitHub Pages site.
PagesError represents a build error for a GitHub Pages site.
PagesSource represents a GitHub page's source.
PageStats represents the total number of github pages.
PingEvent is triggered when a Webhook is added to GitHub.
Plan represents the payment plan for an account.
PreferenceList represents a list of auto trigger checks for repository.
PreReceiveHook represents a GitHub pre-receive hook for a repository.
PRLink represents a single link object from Github pull request _links.
PRLinks represents the "_links" object in a Github pull request.
Project represents a GitHub Project.
ProjectCard represents a card in a column of a GitHub Project.
ProjectCardChange represents the changes when a project card has been edited.
ProjectCardEvent is triggered when a project card is created, updated, moved, converted to an issue, or deleted.
ProjectCardListOptions specifies the optional parameters to the ProjectsService.ListProjectCards method.
ProjectCardMoveOptions specifies the parameters to the ProjectsService.MoveProjectCard method.
ProjectCardOptions specifies the parameters to the ProjectsService.CreateProjectCard and ProjectsService.UpdateProjectCard methods.
ProjectChange represents the changes when a project has been edited.
ProjectCollaboratorOptions specifies the optional parameters to the ProjectsService.AddProjectCollaborator method.
ProjectColumn represents a column of a GitHub Project.
ProjectColumnChange represents the changes when a project column has been edited.
ProjectColumnEvent is triggered when a project column is created, updated, moved, or deleted.
ProjectColumnMoveOptions specifies the parameters to the ProjectsService.MoveProjectColumn method.
ProjectColumnOptions specifies the parameters to the ProjectsService.CreateProjectColumn and ProjectsService.UpdateProjectColumn methods.
ProjectEvent is triggered when project is created, modified or deleted.
ProjectListOptions specifies the optional parameters to the OrganizationsService.ListProjects and RepositoriesService.ListProjects methods.
ProjectOptions specifies the parameters to the RepositoriesService.CreateProject and ProjectsService.UpdateProject methods.
ProjectPermissionLevel represents the permission level an organization member has for a given project.
Protection represents a repository branch's protection.
ProtectionRequest represents a request to create/edit a branch's protection.
PublicEvent is triggered when a private repository is open sourced.
PullReqestBranchUpdateOptions specifies the optional parameters to the PullRequestsService.UpdateBranch method.
PullRequest represents a GitHub pull request on a repository.
PullRequestBranch represents a base or head branch in a GitHub pull request.
PullRequestBranchUpdateResponse specifies the response of pull request branch update.
PullRequestComment represents a comment left on a pull request.
PullRequestEvent is triggered when a pull request is assigned, unassigned, labeled, unlabeled, opened, edited, closed, reopened, synchronize, ready_for_review, locked, unlocked, a pull request review is requested, or a review request is removed.
PullRequestLinks object is added to the Issue object when it's an issue included in the IssueCommentEvent webhook payload, if the webhook is fired by a comment on a PR.
PullRequestListCommentsOptions specifies the optional parameters to the PullRequestsService.ListComments method.
PullRequestListOptions specifies the optional parameters to the PullRequestsService.List method.
PullRequestMergeResult represents the result of merging a pull request.
PullRequestOptions lets you define how a pull request will be merged.
PullRequestReview represents a review of a pull request.
PullRequestReviewCommentEvent is triggered when a comment is created on a portion of the unified diff of a pull request.
PullRequestReviewDismissalRequest represents a request to dismiss a review.
PullRequestReviewEvent is triggered when a review is submitted on a pull request.
PullRequestReviewRequest represents a request to create a review.
PullRequestReviewsEnforcement represents the pull request reviews enforcement of a protected branch.
PullRequestReviewsEnforcementRequest represents request to set the pull request review enforcement of a protected branch.
PullRequestReviewsEnforcementUpdate represents request to patch the pull request review enforcement of a protected branch.
PullStats represents the number of total, merged, mergable and unmergeable pull-requests.
PunchCard represents the number of commits made during a given hour of a day of the week.
PushEvent represents a git push to a GitHub repository.
PushEventCommit represents a git commit in a GitHub PushEvent.
PushEventRepoOwner is a basic representation of user/org in a PushEvent payload.
PushEventRepository represents the repo object in a PushEvent payload.
Rate represents the rate limit for the current client.
RateLimitError occurs when GitHub returns 403 Forbidden response with a rate limit remaining value of 0, and error message starts with "API rate limit exceeded for ".
RateLimits represents the rate limits for the current client.
RawOptions specifies parameters when user wants to get raw format of a response instead of JSON.
Reaction represents a GitHub reaction.
Reactions represents a summary of GitHub reactions.
Reference represents a GitHub reference.
ReferenceListOptions specifies optional parameters to the GitService.ListRefs method.
ReleaseAsset represents a GitHub release asset in a repository.
ReleaseEvent is triggered when a release is published, unpublished, created, edited, deleted, or prerelased.
Rename contains details for 'renamed' events.
RepositoriesSearchResult represents the result of a repositories search.
Repository represents a GitHub repository.
RepositoryAddCollaboratorOptions specifies the optional parameters to the RepositoriesService.AddCollaborator method.
RepositoryComment represents a comment for a commit, file, or line in a repository.
RepositoryCommit represents a commit in a repo.
RepositoryContent represents a file or directory in a github repository.
RepositoryContentFileOptions specifies optional parameters for CreateFile, UpdateFile, and DeleteFile.
RepositoryContentGetOptions represents an optional ref parameter, which can be a SHA, branch, or tag.
RepositoryContentResponse holds the parsed response from CreateFile, UpdateFile, and DeleteFile.
RepositoryCreateForkOptions specifies the optional parameters to the RepositoriesService.CreateFork method.
RepositoryEvent is triggered when a repository is created, archived, unarchived, renamed, edited, transferred, made public, or made private.
RepositoryInvitation represents an invitation to collaborate on a repo.
RepositoryLicense represents the license for a repository.
RepositoryListAllOptions specifies the optional parameters to the RepositoriesService.ListAll method.
RepositoryListByOrgOptions specifies the optional parameters to the RepositoriesService.ListByOrg method.
RepositoryListForksOptions specifies the optional parameters to the RepositoriesService.ListForks method.
RepositoryListOptions specifies the optional parameters to the RepositoriesService.List method.
RepositoryMergeRequest represents a request to merge a branch in a repository.
RepositoryParticipation is the number of commits by everyone who has contributed to the repository (including the owner) as well as the number of commits by the owner themself.
RepositoryPermissionLevel represents the permission level an organization member has for a given repository.
RepositoryRelease represents a GitHub release in a repository.
RepositoryTag represents a repository tag.
RepositoryVulnerabilityAlertEvent is triggered when a security alert is created, dismissed, or resolved.
RepoStats represents the number of total, root, fork, organization repositories together with the total number of pushes and wikis.
RepoStatus represents the status of a repository at a particular reference.
RequestedAction is included in a CheckRunEvent when a user has invoked an action, i.e.
RequiredStatusChecks represents the protection status of a individual branch.
RequiredStatusChecksRequest represents a request to edit a protected branch's status checks.
Response is a GitHub API response.
Reviewers represents reviewers of a pull request.
ReviewersRequest specifies users and teams for a pull request review request.
SearchOptions specifies optional parameters to the SearchService methods.
ServiceHook represents a hook that has configuration settings, a list of available events, and default events.
SignaturesProtectedBranch represents the protection status of an individual branch.
SignatureVerification represents GPG signature verification.
Source represents a reference's source.
SourceImportAuthor identifies an author imported from a source repository.
StarEvent is triggered when a star is added or removed from a repository.
Stargazer represents a user that has starred a repository.
StarredRepository is returned by ListStarred.
StatusEvent is triggered when the status of a Git commit changes.
Subscription identifies a repository or thread subscription.
Tag represents a tag object.
Team represents a team within a GitHub organization.
TeamAddEvent is triggered when a repository is added to a team.
TeamAddTeamMembershipOptions specifies the optional parameters to the TeamsService.AddTeamMembership method.
TeamAddTeamRepoOptions specifies the optional parameters to the TeamsService.AddTeamRepo method.
TeamChange represents the changes when a team has been edited.
TeamDiscussion represents a GitHub dicussion in a team.
TeamEvent is triggered when an organization's team is created, modified or deleted.
TeamLDAPMapping represents the mapping between a GitHub team and an LDAP group.
TeamListTeamMembersOptions specifies the optional parameters to the TeamsService.ListTeamMembers method.
TeamProjectOptions specifies the optional parameters to the TeamsService.AddTeamProject method.
TextMatch represents a text match for a SearchResult.
Timeline represents an event that occurred around an Issue or Pull Request.
Timestamp represents a time that can be unmarshalled from a JSON string formatted as either an RFC3339 or Unix timestamp.
TrafficBreakdownOptions specifies the parameters to methods that support breakdown per day or week.
TrafficClones represent information about the number of clones in the last 14 days.
TrafficData represent information about a specific timestamp in views or clones list.
TrafficPath represent information about the traffic on a path of the repo.
TrafficReferrer represent information about traffic from a referrer .
TrafficViews represent information about the number of views in the last 14 days.
TransferRequest represents a request to transfer a repository.
Tree represents a GitHub tree.
TreeEntry represents the contents of a tree structure.
UnauthenticatedRateLimitedTransport allows you to make unauthenticated calls
that need to use a higher rate limit associated with your OAuth application.
UpdateCheckRunOptions sets up parameters needed to update a CheckRun.
UploadOptions specifies the parameters to methods that support uploads.
User represents a GitHub user.
UserContext represents the contextual information about user.
UserEmail represents user's email address.
UserLDAPMapping represents the mapping between a GitHub user and an LDAP user.
UserListOptions specifies optional parameters to the UsersService.ListAll method.
UserMigration represents a GitHub migration (archival).
UserMigrationOptions specifies the optional parameters to Migration methods.
UsersSearchResult represents the result of a users search.
UserStats represents the number of total, admin and suspended users.
UserSuspendOptions represents the reason a user is being suspended.
WatchEvent is related to starring a repository, not watching.
WebHookAuthor represents the author or committer of a commit, as specified in a WebHookCommit.
WebHookCommit represents the commit variant we receive from GitHub in a WebHookPayload.
WebHookPayload represents the data that is received from GitHub when a push event hook is triggered.
WeeklyCommitActivity represents the weekly commit activity for a repository.
WeeklyStats represents the number of additions, deletions and commits a Contributor made in a given week.
# Type aliases
ActivityService handles communication with the activity related methods of the GitHub API.
AdminService handles communication with the admin related methods of the GitHub API.
AppsService provides access to the installation related functions in the GitHub API.
AuthorizationsService handles communication with the authorization related methods of the GitHub API.
ChecksService provides access to the Checks API in the GitHub API.
GistFilename represents filename on a gist.
GistsService handles communication with the Gist related methods of the GitHub API.
GitignoresService provides access to the gitignore related functions in the GitHub API.
GitService handles communication with the git data related methods of the GitHub API.
InteractionsService handles communication with the repository and organization related methods of the GitHub API.
IssuesService handles communication with the issue related methods of the GitHub API.
LicensesService handles communication with the license related methods of the GitHub API.
MigrationService provides access to the migration related functions in the GitHub API.
OrganizationsService provides access to the organization related functions in the GitHub API.
ProjectsService provides access to the projects functions in the GitHub API.
PullRequestsService handles communication with the pull request related methods of the GitHub API.
RawType represents type of raw format of a request instead of JSON.
ReactionsService provides access to the reactions-related functions in the GitHub API.
RepositoriesService handles communication with the repository related methods of the GitHub API.
Scope models a GitHub authorization scope.
SearchService provides access to the search related functions in the GitHub API.
TeamsService provides access to the team-related functions in the GitHub API.
TwoFactorAuthError occurs when using HTTP Basic Authentication for a user that has two-factor authentication enabled.
UsersService handles communication with the user related methods of the GitHub API.