github

package
v0.0.0-...-329c7de Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildSearchQuery

func BuildSearchQuery(repo string, since string, customQuery string) string

BuildSearchQuery builds a GitHub Search API query string.

func GetLastActivityTime

func GetLastActivityTime(issue *github.Issue) time.Time

GetLastActivityTime returns the later of created_at or updated_at. For items with comments, we would need to fetch comments separately. This implementation uses updated_at as a proxy for last activity.

func IsPR

func IsPR(issue *github.Issue) bool

IsPR determines if an issue is actually a pull request. An issue is a PR if PullRequestLinks is not nil.

Types

type Client

type Client struct {
	*github.Client
}

Client wraps the GitHub client.

func NewClient

func NewClient(token string) *Client

NewClient creates a new GitHub client with the given token.

func (*Client) GetComments

func (c *Client) GetComments(ctx context.Context, owner, repo string, number int) ([]*github.IssueComment, error)

GetComments fetches comments for an issue.

func (*Client) GetEffectiveTime

func (c *Client) GetEffectiveTime(ctx context.Context, issue *github.Issue) time.Time

GetEffectiveTime returns the later of created_at or last comment time. This is the "effective" time used for watermark comparison.

func (*Client) GetIssue

func (c *Client) GetIssue(ctx context.Context, owner, repo string, number int) (*github.Issue, error)

GetIssue fetches a single issue by number. Returns the issue, or an error if not found.

func (*Client) GetLatestCommentTime

func (c *Client) GetLatestCommentTime(ctx context.Context, owner, repo string, number int) (time.Time, bool)

GetLatestCommentTime gets the time of the latest comment on an issue. Returns the comment time, or (zero time, false) if no comments exist.

func (*Client) SearchIssues

func (c *Client) SearchIssues(ctx context.Context, query string) ([]*github.Issue, error)

SearchIssues searches for issues matching the query.

Jump to

Keyboard shortcuts

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