github

package
v0.0.0-...-21ef79a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGithubToken

func GetGithubToken(ctx context.Context) (string, error)

GetGithubToken retrieves the GitHub token from environment variables or the gh CLI. The precedence order is: 1. MANUAL_PAT (Manually provided Personal Access Token) 2. GITHUB_TOKEN (Standard GitHub Actions or environment token) 3. OAUTH_PAT (Token from OAuth flow) 4. gh auth token (Fallback to gh CLI credential helper)

func ListAllCommits

func ListAllCommits(ctx context.Context, client *githubv39.Client, owner, repo string, num int) ([]*githubv39.RepositoryCommit, error)

ListAllCommits retrieves all commits for a pull request handling pagination.

func ListAllIssueComments

func ListAllIssueComments(ctx context.Context, client *githubv39.Client, owner, repo string, num int) ([]*githubv39.IssueComment, error)

ListAllIssueComments retrieves all comments for an issue or pull request handling pagination.

func ListAllReviewComments

func ListAllReviewComments(ctx context.Context, client *githubv39.Client, owner, repo string, prNum int, reviewID int64) ([]*githubv39.PullRequestComment, error)

ListAllReviewComments retrieves all review comments for a pull request review handling pagination.

func ListAllReviews

func ListAllReviews(ctx context.Context, client *githubv39.Client, owner, repo string, num int) ([]*githubv39.PullRequestReview, error)

ListAllReviews retrieves all reviews for a pull request handling pagination.

func NewClient

func NewClient(ctx context.Context) (*githubv39.Client, error)

NewClient creates a new GitHub client using the token retrieved by GetGithubToken.

func NewClientWithToken

func NewClientWithToken(ctx context.Context, token string) *githubv39.Client

NewClientWithToken creates a new GitHub client using an explicit access token.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL