github

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2025 License: Apache-2.0 Imports: 8 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 {
	// contains filtered or unexported fields
}

func NewClient

func NewClient() *Client

func (*Client) DumpCommentsJSON

func (c *Client) DumpCommentsJSON(prNumber int, commentIDs []int64) (string, error)

DumpCommentsJSON returns raw JSON for the selected comment IDs. When commentIDs is empty, all review comments for the PR are returned.

func (*Client) FetchReviewComments

func (c *Client) FetchReviewComments(prNumber int) ([]*ReviewComment, error)

func (*Client) GetCurrentBranchPR

func (c *Client) GetCurrentBranchPR() (int, error)

func (*Client) GetRepo

func (c *Client) GetRepo() (string, error)

GetRepo returns the current repository (format: "owner/repo")

func (*Client) ReplyToReviewComment

func (c *Client) ReplyToReviewComment(prNumber int, commentID int64, body string) (*ThreadComment, error)

ReplyToReviewComment posts a reply to an existing pull request review comment.

func (*Client) ResolveThread

func (c *Client) ResolveThread(threadID string) error

ResolveThread marks a review thread as resolved using GraphQL

func (*Client) SetDebug

func (c *Client) SetDebug(debug bool)

SetDebug enables or disables debug output

func (*Client) SetRepo

func (c *Client) SetRepo(repo string)

SetRepo sets the repository to use (format: "owner/repo")

func (*Client) UnresolveThread

func (c *Client) UnresolveThread(threadID string) error

UnresolveThread marks a review thread as unresolved using GraphQL

type ReviewComment

type ReviewComment struct {
	ID                int64
	ThreadID          string // GraphQL node ID for resolving the thread
	Path              string
	Line              int
	Body              string
	Author            string
	HasSuggestion     bool
	SuggestedCode     string
	OriginalLine      int
	OriginalLines     int
	StartLine         int
	EndLine           int
	OriginalStartLine int
	OriginalEndLine   int
	DiffHunk          string
	DiffSide          diffposition.DiffSide
	SubjectType       string
	HTMLURL           string
	IsOutdated        bool
	ThreadComments    []ThreadComment
}

func (*ReviewComment) IsResolved

func (rc *ReviewComment) IsResolved() bool

IsResolved returns true if the comment thread has been marked as resolved/done

type ThreadComment

type ThreadComment struct {
	ID      int64
	Body    string
	Author  string
	HTMLURL string
}

type ThreadInfo

type ThreadInfo struct {
	ID         string // GraphQL node ID for resolving the thread
	IsResolved bool
	Comments   []ThreadComment
}

ThreadInfo contains information about a review thread

Jump to

Keyboard shortcuts

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