A comprehensive Go client library for interacting with the GitHub REST API v3.
go-github is a Go client library for accessing the GitHub REST API v3. It provides a comprehensive set of methods to interact with GitHub's platform programmatically, handling authentication, rate limiting, pagination, and webhooks. The library abstracts the API's complexity into an idiomatic Go interface, enabling developers to build tools, automation, and integrations with GitHub.
Go developers building applications that need to interact with GitHub's API, such as CI/CD tools, automation scripts, GitHub Apps, or any service that manages repositories, issues, pull requests, or user data.
Developers choose go-github because it is the de facto standard Go library for GitHub API integration, maintained by Google and widely adopted. It offers full API coverage, robust handling of GitHub-specific concerns like rate limiting and authentication, and a stable, idiomatic Go API that follows semantic versioning.
Go library for accessing the GitHub v3 API
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides methods for nearly all GitHub REST API v3 endpoints, logically organized into services, ensuring developers can access almost any GitHub feature programmatically.
Includes built-in detection for primary and secondary rate limits, with utilities like automatic retry and bypass via context flags, reducing common integration pain points.
Offers both page-number and cursor-based pagination, with new iterator patterns in Go 1.23 for seamless consumption of large datasets without manual looping.
Provides Go structs for almost all GitHub webhook events, along with payload validation functions, simplifying webhook handling in Go services.
GitHub App authentication isn't built-in; it requires third-party packages like ghinstallation or go-githubauth, adding setup complexity and potential maintenance overhead.
Uses pointer fields for all non-repeated structs to distinguish unset values, making the API more verbose and less intuitive compared to simpler zero-value handling.
Must constantly adapt to GitHub's calendar versioning, which can introduce breaking changes and require frequent library updates, as noted in the versioning policy.