Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseMention ¶
ParseMention extracts mentions from a comment body
Types ¶
type Command ¶
type Command struct {
Type CommandType
Args string
RawText string
CommentID int64
File string // Optional: file context from review comment
Line int // Optional: line context from review comment
}
Command represents a parsed command from a comment
type CommandContext ¶
type CommandContext struct {
Ctx context.Context
PRTitle string
PRDescription string
PRNumber int
Repository string
CommentBody string // The original comment from user
FilePath string // File path if this is a review comment
FileLine int // Line number if this is a review comment
CodeContext string // Surrounding code context
OriginalIssue string // The original bot comment that user is replying to
Session *state.Session
ConversationHistory []ConversationMessage // Previous messages in this thread
}
CommandContext contains the context for executing a command
type CommandResult ¶
type CommandResult struct {
Response string
UpdateSession bool
DismissIssue bool
DismissedHash string
DismissReason string
TriggerReview bool
}
CommandResult contains the result of executing a command
type CommandType ¶
type CommandType string
CommandType represents the type of command
const ( CommandExplain CommandType = "explain" CommandSuggestFix CommandType = "suggest_fix" CommandIgnore CommandType = "ignore" CommandRegenerate CommandType = "regenerate" CommandHelp CommandType = "help" CommandSummarize CommandType = "summarize" CommandUnknown CommandType = "unknown" )
type ConversationMessage ¶
ConversationMessage represents a message in a conversation thread
type Handler ¶
Handler handles bot commands
func NewHandler ¶
NewHandler creates a new command handler
func (*Handler) Handle ¶
func (h *Handler) Handle(cmd Command, ctx *CommandContext) (*CommandResult, error)
Handle executes a command and returns the response
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser parses commands from PR comments
func (*Parser) IsBotMentioned ¶
IsBotMentioned checks if the bot is mentioned in the comment
Click to show internal directories.
Click to hide internal directories.