Documentation
¶
Index ¶
- type Client
- func (c *Client) FetchAllMergedPRs(since time.Time) ([]*PR, error)
- func (c *Client) FetchAllMergedPRsGraphQL(since time.Time) ([]*PR, error)
- func (c *Client) FetchPRs(prNumbers []int) ([]*PR, error)
- func (c *Client) GetPRDetails(prNumber int) (*PRDetails, error)
- func (c *Client) GetPRValidationDetails(prNumber int) (*PRDetails, error)
- func (c *Client) GetPRWithCommits(prNumber int) (*PR, error)
- type PR
- type PRCommit
- type PRDetails
- type PullRequestsQuery
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 (*Client) FetchAllMergedPRs ¶
FetchAllMergedPRs fetches all merged PRs using GitHub's search API This is much more efficient than fetching PRs individually
func (*Client) FetchAllMergedPRsGraphQL ¶
FetchAllMergedPRsGraphQL fetches all merged PRs with their commits using GraphQL This is the ultimate optimization - gets everything in ~5-10 API calls
func (*Client) GetPRDetails ¶ added in v1.4.262
GetPRDetails fetches a comprehensive set of details for a single PR. Deprecated: Use GetPRValidationDetails + GetPRWithCommits for better performance
func (*Client) GetPRValidationDetails ¶ added in v1.4.262
GetPRValidationDetails fetches only the data needed for validation (lightweight).
type PRDetails ¶ added in v1.4.262
PRDetails encapsulates all relevant information about a Pull Request.
type PullRequestsQuery ¶
type PullRequestsQuery struct {
Repository struct {
PullRequests struct {
PageInfo struct {
HasNextPage bool
EndCursor string
}
Nodes []struct {
Number int
Title string
Body string
URL string
MergedAt time.Time
Author *struct {
Typename string `graphql:"__typename"`
Login string `graphql:"login"`
URL string `graphql:"url"`
}
Commits struct {
Nodes []struct {
Commit struct {
OID string `graphql:"oid"`
Message string
AuthoredDate time.Time `graphql:"authoredDate"`
Author struct {
Name string
}
}
}
} `graphql:"commits(first: 250)"`
}
} `graphql:"pullRequests(first: 100, after: $after, states: MERGED, orderBy: {field: UPDATED_AT, direction: DESC})"`
} `graphql:"repository(owner: $owner, name: $repo)"`
}
GraphQL query structures for hasura client
Click to show internal directories.
Click to hide internal directories.