github

package
v0.0.0-...-ab02267 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: MIT Imports: 4 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 {
	*github.Client
}

func NewClient

func NewClient(token string) *Client

NewClient returns a new GitHub Client.

func (*Client) PostComment

func (c *Client) PostComment(ctx context.Context, issueComment *IssueComment, body string) error

PostComment sends a comment to an issue.

func (*Client) ReactWithThumbsUp

func (c *Client) ReactWithThumbsUp(ctx context.Context, issueComment *IssueComment) error

ReactWithThumbsUp sends a :+1: reaction to the given IssueComment.

func (*Client) UpdateIssueDescription

func (c *Client) UpdateIssueDescription(ctx context.Context, issueComment *IssueComment, body string) error

UpdateIssueDescription updates the issue description.

type Comment

type Comment struct {
	Body      string `json:"body"`
	NodeID    string `json:"node_id"`
	ID        uint64 `json:"id"`
	Reactions `json:"reactions"`
}

Comment holds the comment from the IssueComment.

type Issue

type Issue struct {
	CommentsURL string `json:"comments_url"`
	Body        string `json:"body"`
	State       string `json:"state"`
	URL         string `json:"url"`
	HTMLURL     string `json:"html_url"`
	Title       string `json:"title"`
}

Issue holds the issue from the issue comment.

type IssueComment

type IssueComment struct {
	Action  string `json:"action"`
	Issue   `json:"issue"`
	Comment `json:"comment"`
}

IssueComment holds the comment received.

func (IssueComment) ToJSON

func (ic IssueComment) ToJSON() ([]byte, error)

Converts the IssueComment into a JSON.

type Reactions

type Reactions struct {
	URL string `json:"url"`
}

Reactions from the Comment.

Jump to

Keyboard shortcuts

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