github

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const BotCommentIdentifier = "🍲 miso Code review"

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(token string) (*Client, error)

func (*Client) CleanupOldComments

func (c *Client) CleanupOldComments(ctx context.Context, prNumber int) error

CleanupOldComments finds all comments posted by the bot with the specific identifier and deletes all but the most recent one.

func (*Client) FindBotComment

func (c *Client) FindBotComment(ctx context.Context, prNumber int, identifier string) (*github.IssueComment, error)

func (*Client) GetPRInfo

func (c *Client) GetPRInfo() (*PREvent, error)

func (*Client) PostOrUpdateComment

func (c *Client) PostOrUpdateComment(ctx context.Context, prNumber int, content string) error

type PREvent

type PREvent struct {
	PullRequest struct {
		Number int `json:"number"`
		Base   struct {
			SHA string `json:"sha"`
		} `json:"base"`
		Head struct {
			SHA string `json:"sha"`
		} `json:"head"`
	} `json:"pull_request"`
}

Jump to

Keyboard shortcuts

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