Documentation ¶
Overview ¶
Package issues provides a general way to interact with issues, and a client for interacting with the GitHub issues API.
Index ¶
- type Client
- func (c *Client) CreateIssue(ctx context.Context, iss *Issue) (number int, err error)
- func (c *Client) Destination() string
- func (c *Client) Issue(ctx context.Context, number int) (_ *Issue, err error)
- func (c *Client) IssueExists(ctx context.Context, number int) (_ bool, err error)
- func (c *Client) Issues(ctx context.Context, opts IssuesOptions) (_ []*Issue, err error)
- func (c *Client) Reference(num int) string
- type Config
- type Issue
- type IssuesOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is a shallow client for a github.Client.
func NewTestClient ¶
NewTestClient creates a Client for use in tests.
func (*Client) CreateIssue ¶
CreateIssue creates a new issue.
func (*Client) Destination ¶
Destination returns the URL of the Github repo.
func (*Client) IssueExists ¶
IssueExists reports whether an issue with the given ID exists.
type Config ¶
type Config struct { // Owner is the owner of a GitHub repo. For example, "golang" is the owner // for github.com/khulnasoft-lab/go-vulndb. Owner string // Repo is the name of a GitHub repo. For example, "vulndb" is the repo // name for github.com/khulnasoft-lab/go-vulndb. Repo string // Token is access token that authorizes and authenticates // requests to the GitHub API. Token string }
Config is used to initialize a new Client.
type Issue ¶
type Issue struct { Number int Title string Body string State string Labels []string CreatedAt time.Time }
Issue represents a GitHub issue.
type IssuesOptions ¶
type IssuesOptions struct { // State filters issues based on their state. Possible values are: open, // closed, all. Default is "open". State string // Labels filters issues based on their label. Labels []string }
IssuesOptions are options for Issues
Directories ¶
Path | Synopsis |
---|---|
Package githubtest provides a test client and server for testing the GitHub API client.
|
Package githubtest provides a test client and server for testing the GitHub API client. |
Click to show internal directories.
Click to hide internal directories.