Documentation
¶
Overview ¶
Package gh interact with GitHub's api, wrapper around cli/go-gh client object.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
func (*Client) Enrich ¶ added in v0.2.7
func (c *Client) Enrich(n *notifications.Notification) error
func (*Client) Notifications ¶
func (c *Client) Notifications() (notifications.Notifications, error)
type Endpoint ¶ added in v0.6.8
type Endpoint struct {
// Pull all notifications from the endpoint.
// By default, only the unread notifications are fetched.
// This maps to `?all=true|false` in the GitHub API.
// See https://docs.github.com/en/rest/activity/notifications?apiVersion=2022-11-28#list-notifications-for-the-authenticated-user
All bool `mapstructure:"all"`
// The maximum number of retries to fetch notifications.
// The Notifications API is notably flaky, retrying HTTP requests is
// definitely needed.
MaxRetry int `mapstructure:"max_retry"`
// The number of notification pages to fetch.
// This will cap the `?page=X` parameter in the GitHub API.
// See https://docs.github.com/en/rest/activity/notifications?apiVersion=2022-11-28#list-notifications-for-the-authenticated-user
MaxPage int `mapstructure:"max_page"`
// The number of notifications to fetch per page.
// This maps to `?per_page=X` in the GitHub API.
// See https://docs.github.com/en/rest/activity/notifications?apiVersion=2022-11-28#list-notifications-for-the-authenticated-user
PerPage int `mapstructure:"per_page"`
}
type RetryError ¶ added in v0.2.3
type RetryError struct {
// contains filtered or unexported fields
}
func (RetryError) Error ¶ added in v0.2.3
func (e RetryError) Error() string
type ThreadExtra ¶ added in v0.4.9
type ThreadExtra struct {
User notifications.User `json:"user"`
State string `json:"state"`
HTMLURL string `json:"html_url"`
Assignees []notifications.User `json:"assignees"`
Reviewers []notifications.User `json:"requested_reviewers"`
ReviewersTeams []notifications.Team `json:"requested_teams"`
}
Click to show internal directories.
Click to hide internal directories.