github

package
v0.0.0-...-e8f8255 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 2 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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