github

package
v0.0.0-...-0724540 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2025 License: Unlicense Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Branch

type Branch struct {
	Ref string `json:"ref"`
}

Branch represents a GitHub branch reference

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client wraps the shared GitHub client helpers for ingest.

func NewClient

func NewClient() *Client

NewClient creates a GitHub API client with shared HTTP configuration.

func NewClientWithContext

func NewClientWithContext(ctx context.Context) *Client

NewClientWithContext creates a GitHub API client using the provided context.

func (*Client) FetchIssueCommentReactions

func (c *Client) FetchIssueCommentReactions(owner, repo string, commentID int64) ([]Reaction, error)

FetchIssueCommentReactions returns reactions for a specific issue comment.

func (*Client) FetchIssueComments

func (c *Client) FetchIssueComments(owner, repo string, issueNumber int) ([]Comment, error)

FetchIssueComments fetches all comments for an issue.

func (*Client) FetchIssueReactions

func (c *Client) FetchIssueReactions(owner, repo string, issueNumber int) ([]Reaction, error)

FetchIssueReactions returns all reactions attached to the issue itself.

func (*Client) FetchIssues

func (c *Client) FetchIssues(owner, repo, state string, progressCallback func(count int)) ([]Issue, error)

FetchIssues fetches all issues for a repository with pagination.

func (*Client) FetchPRComments

func (c *Client) FetchPRComments(owner, repo string, prNumber int) ([]Comment, error)

FetchPRComments fetches all comments for a pull request (includes review comments).

func (*Client) FetchPullRequests

func (c *Client) FetchPullRequests(owner, repo, state string, progressCallback func(count int)) ([]PullRequest, error)

FetchPullRequests fetches all pull requests for a repository with pagination.

func (*Client) FetchReviewCommentReactions

func (c *Client) FetchReviewCommentReactions(owner, repo string, commentID int64) ([]Reaction, error)

FetchReviewCommentReactions returns reactions for a pull request review comment.

type Comment

type Comment struct {
	ID        int64     `json:"id"`
	Body      string    `json:"body"`
	User      User      `json:"user"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

Comment represents a GitHub comment

type Issue

type Issue struct {
	Number           int        `json:"number"`
	Title            string     `json:"title"`
	Body             string     `json:"body"`
	State            string     `json:"state"`
	User             User       `json:"user"`
	CreatedAt        time.Time  `json:"created_at"`
	UpdatedAt        time.Time  `json:"updated_at"`
	ClosedAt         *time.Time `json:"closed_at"`
	Labels           []Label    `json:"labels"`
	Assignees        []User     `json:"assignees"`
	Milestone        *Milestone `json:"milestone"`
	NodeID           string     `json:"node_id"`
	ID               int64      `json:"id"`
	HTMLURL          string     `json:"html_url"`
	APIURL           string     `json:"api_url"`
	CommentsURL      string     `json:"comments_url"`
	EventsURL        string     `json:"events_url"`
	StateReason      string     `json:"state_reason"`
	Locked           bool       `json:"locked"`
	ActiveLockReason string     `json:"active_lock_reason"`
	Draft            bool       `json:"draft"`
	ClosedBy         string     `json:"closed_by"`
}

Issue represents a GitHub issue

type Label

type Label struct {
	Name string `json:"name"`
}

Label represents a GitHub label

type Milestone

type Milestone struct {
	Title string `json:"title"`
}

Milestone represents a GitHub milestone

type PullRequest

type PullRequest struct {
	Number             int        `json:"number"`
	Title              string     `json:"title"`
	Body               string     `json:"body"`
	State              string     `json:"state"`
	User               User       `json:"user"`
	CreatedAt          time.Time  `json:"created_at"`
	UpdatedAt          time.Time  `json:"updated_at"`
	ClosedAt           *time.Time `json:"closed_at"`
	MergedAt           *time.Time `json:"merged_at"`
	Merged             bool       `json:"merged"`
	Draft              bool       `json:"draft"`
	Base               Branch     `json:"base"`
	Head               Branch     `json:"head"`
	Labels             []Label    `json:"labels"`
	Assignees          []User     `json:"assignees"`
	RequestedReviewers []User     `json:"requested_reviewers"`
	Milestone          *Milestone `json:"milestone"`
}

PullRequest represents a GitHub pull request

type Reaction

type Reaction struct {
	ID      int64  `json:"id"`
	Content string `json:"content"`
	User    User   `json:"user"`
}

Reaction represents a GitHub reaction.

type User

type User struct {
	Login string `json:"login"`
}

User represents a GitHub user

Jump to

Keyboard shortcuts

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