github

package
v0.0.0-...-a9a38bb Latest Latest
Warning

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

Go to latest
Published: May 25, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient(cfg *config.GitHubConfig) *Client

func (*Client) GetPullRequests

func (c *Client) GetPullRequests(ctx context.Context, state string, perPage int) ([]*PrData, error)

GetPullRequests fetches a list of pull requests for the configured repository. It can be filtered by state (e.g., "closed", "all").

type PrData

type PrData struct {
	Number          int
	Title           string
	State           string // e.g., "open", "closed", "merged"
	Author          string
	CreatedAt       time.Time
	MergedAt        *time.Time // Pointer as it can be nil if not merged
	ClosedAt        *time.Time // Pointer as it can be nil if not closed
	Additions       int
	Deletions       int
	ChangedFiles    int
	FirstReviewedAt *time.Time // Timestamp of the first review
	Labels          []string   // Labels applied to the PR
}

PrData represents simplified pull request information

Jump to

Keyboard shortcuts

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