github

package
v0.0.0-...-bf5f488 Latest Latest
Warning

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

Go to latest
Published: May 14, 2023 License: Apache-2.0 Imports: 2 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 {
	GithubClient *github.Client
}

* The github package exports a Client struct which has a GithubClient field of * type *github.Client. The NewClient function returns a new Client struct with a * properly instantiated GithubClient field. The ListRepos, CreateIssue, * SubmitComment, and ReplyComment methods are provided as an example of how to * use the GithubClient to interact with the GitHub API to list repos, create * issues, submit comments, and reply to comments

Client struct to hold the github client

func NewClient

func NewClient(token string) *Client

NewClient returns a new github client

func (*Client) CreateIssue

func (c *Client) CreateIssue(owner, repo string, issue *github.IssueRequest) (*github.Issue, error)

CreateIssue creates an issue in a repo

func (*Client) ListRepos

func (c *Client) ListRepos(username string) ([]*github.Repository, error)

ListRepos lists the repos of a user

func (*Client) ReplyComment

func (c *Client) ReplyComment(owner, repo string, commentID int, comment string) (*github.IssueComment, error)

ReplyComment reply to a comment on an issue

func (*Client) SubmitComment

func (c *Client) SubmitComment(owner, repo string, issueNumber int, comment string) (*github.IssueComment, error)

SubmitComment submit a comment to an issue

Jump to

Keyboard shortcuts

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