Documentation
¶
Index ¶
- Constants
- type Client
- func (c *Client) CreateComment(owner, repo string, number int, body string) error
- func (c *Client) CreateOrUpdateComment(owner, repo string, number int, body string) error
- func (c *Client) CreateReview(owner, repo string, number int, comments []*github.DraftReviewComment, ...) error
- func (c *Client) CreateReviewWithOptions(owner, repo string, number int, comments []*github.DraftReviewComment, ...) error
- func (c *Client) FindBotComment(owner, repo string, number int) (*github.IssueComment, error)
- func (c *Client) GetCommentThread(owner, repo string, number int, commentID int64) ([]ConversationMessage, error)
- func (c *Client) GetExistingCommentsByLocation(owner, repo string, number int) (map[string]*ExistingComment, error)
- func (c *Client) GetIssueCommentThread(owner, repo string, number int) ([]ConversationMessage, error)
- func (c *Client) GetPR(owner, repo string, number int) (*PRInfo, error)
- func (c *Client) GetPRFromEvent(eventPath string) (*PRInfo, error)
- func (c *Client) GetPRFromURL(url string) (*PRInfo, error)
- func (c *Client) ListReviewComments(owner, repo string, number int) ([]*github.PullRequestComment, error)
- func (c *Client) ReplyToComment(owner, repo string, number int, commentID int64, body string) error
- func (c *Client) UpdateComment(owner, repo string, commentID int64, body string) error
- func (c *Client) UpdatePR(owner, repo string, number int, title, body *string) error
- type ConversationMessage
- type CreateReviewOptions
- type ExistingComment
- type GitHubEvent
- type PRInfo
Constants ¶
const BotCommentMarker = "<!-- manque-ai-bot -->"
BotCommentMarker is used to identify comments created by this bot
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CreateComment ¶
func (*Client) CreateOrUpdateComment ¶
CreateOrUpdateComment creates a new comment or updates an existing bot comment
func (*Client) CreateReview ¶
func (*Client) CreateReviewWithOptions ¶
func (c *Client) CreateReviewWithOptions(owner, repo string, number int, comments []*github.DraftReviewComment, body *string, action string, opts CreateReviewOptions) error
func (*Client) FindBotComment ¶
FindBotComment finds an existing comment created by this bot
func (*Client) GetCommentThread ¶
func (c *Client) GetCommentThread(owner, repo string, number int, commentID int64) ([]ConversationMessage, error)
GetCommentThread gets the conversation thread for a review comment
func (*Client) GetExistingCommentsByLocation ¶
func (c *Client) GetExistingCommentsByLocation(owner, repo string, number int) (map[string]*ExistingComment, error)
GetExistingCommentsByLocation returns existing comments indexed by file:line
func (*Client) GetIssueCommentThread ¶
func (c *Client) GetIssueCommentThread(owner, repo string, number int) ([]ConversationMessage, error)
GetIssueCommentThread gets conversation thread from issue comments
func (*Client) ListReviewComments ¶
func (c *Client) ListReviewComments(owner, repo string, number int) ([]*github.PullRequestComment, error)
ListReviewComments lists all review comments on a pull request
func (*Client) ReplyToComment ¶
ReplyToComment adds a reply to an existing review comment
func (*Client) UpdateComment ¶
UpdateComment updates an existing review comment
type ConversationMessage ¶
ConversationMessage represents a single message in a conversation thread
type CreateReviewOptions ¶
type CreateReviewOptions struct {
IsIncremental bool // If true, reply to existing comments instead of creating new ones
}
CreateReviewOptions configures the review creation behavior
type ExistingComment ¶
type ExistingComment struct {
ID int64
Path string
StartLine int
EndLine int
Body string
IsBot bool // True if created by manque-ai
}
ExistingComment represents a comment that already exists on a PR
type GitHubEvent ¶
type GitHubEvent struct {
PullRequest struct {
Number int `json:"number"`
Title string `json:"title"`
Body string `json:"body"`
Head struct {
SHA string `json:"sha"`
} `json:"head"`
} `json:"pull_request"`
Repository struct {
FullName string `json:"full_name"`
Name string `json:"name"`
Owner struct {
Login string `json:"login"`
} `json:"owner"`
} `json:"repository"`
}