Documentation
¶
Index ¶
- type Client
- func (c *Client) DumpCommentsJSON(prNumber int, commentIDs []int64) (string, error)
- func (c *Client) FetchReviewComments(prNumber int) ([]*ReviewComment, error)
- func (c *Client) GetCurrentBranchPR() (int, error)
- func (c *Client) GetRepo() (string, error)
- func (c *Client) ListOpenPRs() ([]*PullRequest, error)
- func (c *Client) ReplyToReviewComment(prNumber int, commentID int64, body string) (*ThreadComment, error)
- func (c *Client) ResolveThread(threadID string) error
- func (c *Client) SetDebug(debug bool)
- func (c *Client) SetRepo(repo string)
- func (c *Client) UnresolveThread(threadID string) error
- type PullRequest
- type ReviewComment
- type ThreadComment
- type ThreadInfo
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 (*Client) DumpCommentsJSON ¶
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 (*Client) ListOpenPRs ¶ added in v1.2.0
func (c *Client) ListOpenPRs() ([]*PullRequest, error)
ListOpenPRs fetches all open pull requests for the repository
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 ¶
ResolveThread marks a review thread as resolved using GraphQL
func (*Client) UnresolveThread ¶
UnresolveThread marks a review thread as unresolved using GraphQL
type PullRequest ¶ added in v1.2.0
type PullRequest struct {
Number int
Title string
Author string
State string
IsDraft bool
HeadRefName string
ReviewDecision string // APPROVED, CHANGES_REQUESTED, REVIEW_REQUIRED, etc.
}
PullRequest represents a GitHub pull request with display-relevant fields
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 ThreadInfo ¶
type ThreadInfo struct {
ID string // GraphQL node ID for resolving the thread
IsResolved bool
Comments []ThreadComment
}
ThreadInfo contains information about a review thread
Click to show internal directories.
Click to hide internal directories.