Categorygithub.com/gardenbed/go-github
modulepackage
0.1.1
Repository: https://github.com/gardenbed/go-github.git
Documentation: pkg.go.dev

# README

Go Doc Build Status Go Report Card Test Coverage

go-github

A simple Go client for GitHub API v3.

Quick Start

You can find more examples here.

package main

import (
  "context"
  "fmt"

  "github.com/gardenbed/go-github"
)

func main() {
  client := github.NewClient("")
  commits, resp, err := client.Repo("octocat", "Hello-World").Commits(context.Background(), 50, 1)
  if err != nil {
    panic(err)
  }

  fmt.Printf("Pages: %+v\n", resp.Pages)
  fmt.Printf("Rate: %+v\n\n", resp.Rate)
  for _, commit := range commits {
    fmt.Printf("%s\n", commit.SHA)
  }
}

# Packages

No description provided by the author

# Functions

NewClient creates a new client for calling public GitHub API v3.
NewEnterpriseClient creates a new client for calling an enterprise GitHub API v3.
QualifierAssignee creates a qualifier for matching an assignee.
QualifierAuthor creates a qualifier for matching an author.
QualifierAuthorApp creates a qualifier for matching an author app.
QualifierBase creates a qualifier for matching a base branch.
QualifierClosedAfter creates a qualifier for matching issues and pull requests closed after a date.
QualifierClosedBefore creates a qualifier for matching issues and pull requests closed before a date.
QualifierClosedBetween creates a qualifier for matching issues and pull requests closed between two dates.
QualifierClosedOn creates a qualifier for matching issues and pull requests closed on a date.
QualifierClosedOnOrAfter creates a qualifier for matching issues and pull requests closed on or after a date.
QualifierClosedOnOrBefore creates a qualifier for matching issues and pull requests closed on or before a date.
QualifierCreatedAfter creates a qualifier for matching issues and pull requests created after a date.
QualifierCreatedBefore creates a qualifier for matching issues and pull requests created before a date.
QualifierCreatedBetween creates a qualifier for matching issues and pull requests created between two dates.
QualifierCreatedOn creates a qualifier for matching issues and pull requests created on a date.
QualifierCreatedOnOrAfter creates a qualifier for matching issues and pull requests created on or after a date.
QualifierCreatedOnOrBefore creates a qualifier for matching issues and pull requests created on or before a date.
QualifierHead creates a qualifier for matching a head branch.
QualifierLabel creates a qualifier for matching a label.
QualifierLanguage creates a qualifier for matching a language.
QualifierMergedAfter creates a qualifier for matching pull requests merged after a date.
QualifierMergedBefore creates a qualifier for matching pull requests merged before a date.
QualifierMergedBetween creates a qualifier for matching pull requests merged between two dates.
QualifierMergedOn creates a qualifier for matching pull requests merged on a date.
QualifierMergedOnOrAfter creates a qualifier for matching pull requests merged on or after a date.
QualifierMergedOnOrBefore creates a qualifier for matching pull requests merged on or before a date.
QualifierMilestone creates a qualifier for matching a milestone.
QualifierOrg creates a qualifier for matching an organization.
QualifierProject creates a qualifier for matching a project board.
QualifierRepo creates a qualifier for matching a repository.
QualifierRepoProject creates a qualifier for matching a repository project board.
QualifierTopic creates a qualifier for matching a topic.
QualifierUpdatedAfter creates a qualifier for matching issues and pull requests updated after a date.
QualifierUpdatedBefore creates a qualifier for matching issues and pull requests updated before a date.
QualifierUpdatedBetween creates a qualifier for matching issues and pull requests updated between two dates.
QualifierUpdatedOn creates a qualifier for matching issues and pull requests updated on a date.
QualifierUpdatedOnOrAfter creates a qualifier for matching issues and pull requests updated on or after a date.
QualifierUpdatedOnOrBefore creates a qualifier for matching issues and pull requests updated on or before a date.
QualifierUser creates a qualifier for matching a user.

# Constants

AscOrder returns the search results in ascending order.
DefaultOrder uses the default ordering.
DescOrder returns the search results in descending order.
PermissionAdmin gives a contributor full access to a project, including sensitive and destructive actions.
PermissionMaintain allows a contributor to manage a repository without access to sensitive or destructive actions.
PermissionNone does not allow anything.
PermissionRead allows a contributor to view or discuss a project.
PermissionTriage allows a contributor to manage issues and pull requests without write access.
PermissionWrite allows a contributor to push to a project.
QualifierArchivedFalse matches unarchived repositories.
QualifierArchivedTrue matches archived repositories.
QualifierDraftFalse matches pull requests that are ready for review.
QualifierDraftTrue matches draft pull requests.
QualifierInBody matches issues or pull requests titles or bodies.
QualifierInComments matches issues or pull requests comments.
QualifierInDescription matches a repository description.
QualifierInName matches a user email.
QualifierInLogin matches a user username.
QualifierInName matches a user/repository name.
QualifierInREADME matches a repository README file content.
QualifierInTitle matches issues or pull requests titles.
QualifierIsClosed matches closed issues or pull requests.
QualifierIsInternal matches internal repositories.
QualifierIsIssue matches issues.
QualifierIsLocked matches issues or pull requests that have a locked conversation.
QualifierIsMerged matches merged pull requests.
QualifierIsOpen matches open issues or pull requests.
QualifierIsPR matches pull requests.
QualifierIsPrivate matches private repositories that the user can access.
QualifierIsPublic matches public repositories.
QualifierIsUnlocked matches issues or pull requests that have an unlocked conversation.
QualifierIsUnmerged matches closed issues or pull requests.
QualifierNoAssignee matches issues or pull requests without any assignees.
QualifierNoLabel matches issues or pull requests without any labels.
QualifierNoMilestone matches issues or pull requests without a milestone.
QualifierNoProject matches issues or pull requests without any projects.
QualifierStateClosed matches closed issues or pull requests.
QualifierStateOpen matches open issues or pull requests.
QualifierStatusFailure matches open pull requests with a failed status.
QualifierStatusPending matches open pull requests with a pending status.
QualifierStatusSuccess matches open pull requests with a successful status.
QualifierTypeIssue matches issues.
QualifierTypeOrg matches organizations.
QualifierTypePR matches pull requests.
QualifierTypeUser matches users.
ScopeAdminGPGKey grants access to fully manage GPG keys.
ScopeAdminOrg grants access to fully manage the organization and its teams, projects, and memberships.
ScopeAdminOrgHook grants read, write, ping, and delete access to organization hooks.
ScopeAdminPublicKey grants access to fully manage public keys.
ScopeAdminRepoHook grants read, write, ping, and delete access to repository hooks in public and private repositories.
ScopeDeletePackages grants access to delete packages from GitHub Packages.
ScopeDeleteRepo grants access to delete adminable repositories.
ScopeGist grants write access to gists.
ScopeNotifications grants read access to a user's notifications and misc.
ScopePublicRepo grants access only to public repositories.
ScopeReadDiscussion allows read access for team discussions.
ScopeReadGPGKey grants access to list and view details for GPG keys.
ScopeReadOrg grants read-only access to organization membership, organization projects, and team membership.
ScopeReadPackages grants access to download or install packages from GitHub Packages.
ScopeReadPublicKey grants access to list and view details for public keys.
ScopeReadRepoHook grants read and ping access to hooks in public or private repositories.
ScopeReadUser grants access to read a user's profile data.
ScopeRepo grants full access to private and public repositories.
ScopeRepoDeployment grants access to deployment statuses for public and private repositories.
ScopeRepoInvite grants accept/decline abilities for invitations to collaborate on a repository.
ScopeRepoStatus grants read/write access to public and private repository commit statuses.
ScopeSecurityEvents grants read and write access to security events in the code scanning API.
ScopeUser grants read/write access to profile info only.
ScopeUserEmail grants read access to a user's email addresses.
ScopeUserFollow grants access to follow or unfollow other users.
ScopeWorkflow grants the ability to add and update GitHub Actions workflow files.
ScopeWriteDiscussion allows read and write access for team discussions.
ScopeWriteGPGKey grants access to create, list, and view details for GPG keys.
ScopeWriteOrg grants read and write access to organization membership, organization projects, and team membership.
ScopeWritePackages grants access to upload or publish a package in GitHub Packages.
ScopeWritePublicKey grants access to create, list, and view details for public keys.
ScopeWriteRepoHook grants read, write, and ping access to hooks in public or private repositories.
SortByComments issues and pull requests by the number of comments.
SortByCreated sorts issues and pull requests by the time they are created.
SortByDefault uses the default sorting criteria (best match).
SortByFollowers sorts users by the number of followers.
SortForks sorts repositories by the number of forks.
SortByInteractions issues and pull requests by the number of interactions.
SortByJoined sorts users by when the joined GitHub.
SortByReactions issues and pull requests by the number of reactions.
SortByRepositories sorts users by the number of repositories.
SortStars sorts repositories by the number of stars.
SortUpdated sorts repositories, issues, and pull requests by the time they are updated.

# Structs

AuthError occurs when there is an authentication problem.
Branch is a GitHub branch object.
Client is used for making API calls to GitHub API v3.
No description provided by the author
No description provided by the author
Event is a GitHub event object.
No description provided by the author
No description provided by the author
IssueService provides GitHub APIs for issues in a repository.
IssuesFilter are used for fetching Issues.
Label is a GitHub label object.
Milestone is a GitHub milestone object.
NotFoundError occurs when a resource is not found.
Pages represents the pagination information for GitHub API v3.
No description provided by the author
No description provided by the author
PullService provides GitHub APIs for pull requests in a repository.
PullsFilter are used for fetching Pulls.
No description provided by the author
Rate represents the rate limit status for the authenticated user.
RateLimitAbuseError occurs when best practices for using the legitimate rate limit are not observed.
RateLimitError occurs when there is no remaining call in the current hour for the authenticated user.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ReleaseService provides GitHub APIs for releases in a repository.
RepoService provides GitHub APIs for a repository.
Repository is a GitHub repository object.
Response represents an HTTP response for GitHub API v3.
ResponseError is a generic error for HTTP calls to GitHub API v3.
SearchIssuesResult is the result of searching issues and pull requests.
SearchQuery is used for searching GitHub.
SearchReposResult is the result of searching repositories.
SearchService provides GitHub APIs for searching users, repositories, issues, pull requests, etc.
SearchUsersResult is the result of searching users.
No description provided by the author
Tag is a GitHib tag object.
No description provided by the author
User is a GitHub user object.
UserService provides GitHub APIs for users.

# Type aliases

Epoch is a Unix timestamp.
Permission represents a GitHub repository permission.
Qualifier is a GitHub search qualifier.
Scope represents a GitHub authorization scope.
SearchResultOrder determines the order of search results.
SearchResultSort determines how to sort search results.