Documentation
¶
Overview ¶
Package githubclient is responsible for interacting with the GitHub API
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var IssueQuery struct { Repository struct { Issues struct { Nodes []struct { Number int Title string State string CreatedAt time.Time UpdatedAt time.Time Labels struct { Nodes []struct { Name string } } `graphql:"labels(first: 100)"` Author struct { Login string } } PageInfo struct { HasNextPage bool EndCursor githubv4.String } } `graphql:"issues(first: 100, after: $cursor)"` } `graphql:"repository(owner: $owner, name: $name)"` }
View Source
var OpenIssueCountQuery struct { Repository struct { Issues struct { TotalCount int } `graphql:"issues(states: OPEN)"` } `graphql:"repository(owner: $owner, name: $name)"` }
View Source
var OpenPullRequestCountQuery struct { Repository struct { PullRequests struct { TotalCount int } `graphql:"pullRequests(states: OPEN)"` } `graphql:"repository(owner: $owner, name: $name)"` }
View Source
var PRQuery struct { Repository struct { PullRequests struct { Nodes []struct { Number int Title string State string CreatedAt time.Time UpdatedAt time.Time Labels struct { Nodes []struct { Name string } } `graphql:"labels(first: 100)"` Author struct { Login string } Merged bool } PageInfo struct { HasNextPage bool EndCursor githubv4.String } } `graphql:"pullRequests(first: 100, after: $cursor)"` } `graphql:"repository(owner: $owner, name: $name)"` }
View Source
var ReleaseQuery struct { Repository struct { LatestRelease struct { TagName string PublishedAt time.Time } } `graphql:"repository(owner: $owner, name: $name)"` }
Functions ¶
This section is empty.
Types ¶
type GitHubClient ¶
type GitHubClient interface { GetIssues(ctx context.Context, owner string, repo string) ([]Issue, error) GetOpenIssueCount(ctx context.Context, owner string, repo string) (IssueCount, error) GetPullRequests(ctx context.Context, owner string, repo string) ([]PullRequest, error) GetOpenPullRequestCount(ctx context.Context, owner string, repo string) (PullRequestCount, error) GetLatestRelease(ctx context.Context, owner string, repo string) ([]Release, error) }
func NewGitHubClient ¶
func NewGitHubClient() (GitHubClient, error)
type IssueCount ¶ added in v0.3.0
type PullRequest ¶
type PullRequest struct { Repository string `json:"repository"` Number int `json:"number"` Title string `json:"title"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` State string `json:"state"` Merged bool `json:"merged"` Labels []string `json:"labels"` Author string `json:"author"` }
type PullRequestCount ¶ added in v0.3.0
Click to show internal directories.
Click to hide internal directories.