Documentation
¶
Index ¶
Constants ¶
const ( // SummaryMarker is the HTML comment marker used to identify Holon summary comments SummaryMarker = "<!-- holon-summary-marker -->" // BotLoginEnv is the environment variable for the bot's GitHub login BotLoginEnv = "HOLON_GITHUB_BOT_LOGIN" // DefaultBotLogin is the default bot login name DefaultBotLogin = "holonbot[bot]" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CheckRun ¶
type CheckRun struct {
Name string `json:"name"`
Conclusion string `json:"conclusion"` // "failure", "success", "cancelled"
FixStatus string `json:"fix_status"` // "fixed", "unfixed", "not-applicable"
Message string `json:"message"`
}
CheckRun represents a CI/check run status update from pr-fix.json.
type CommentResult ¶
type CommentResult struct {
Posted bool `json:"posted"`
Updated bool `json:"updated,omitempty"` // true if an existing comment was updated
CommentID int64 `json:"comment_id,omitempty"`
Error string `json:"error,omitempty"`
}
CommentResult represents the result of posting/updating a summary comment.
type FollowUpIssue ¶
type FollowUpIssue struct {
Title string `json:"title"`
Body string `json:"body"`
DeferredCommentIDs []int64 `json:"deferred_comment_ids"`
Labels []string `json:"labels,omitempty"`
IssueURL string `json:"issue_url,omitempty"`
}
FollowUpIssue represents a follow-up issue for deferred work.
type FollowUpIssueDetail ¶
FollowUpIssueDetail represents a created follow-up issue.
type FollowUpIssuesResult ¶
type FollowUpIssuesResult struct {
Created []FollowUpIssueDetail `json:"created,omitempty"`
CreatedCount int `json:"created_count"`
DeferredCount int `json:"deferred_count"`
}
FollowUpIssuesResult represents the result of handling follow-up issues.
type GitHubPublisher ¶
type GitHubPublisher struct {
// contains filtered or unexported fields
}
GitHubPublisher publishes Holon outputs to GitHub PRs.
func NewGitHubPublisher ¶
func NewGitHubPublisher() *GitHubPublisher
NewGitHubPublisher creates a new GitHub publisher instance.
func (*GitHubPublisher) Name ¶
func (g *GitHubPublisher) Name() string
Name returns the provider name.
func (*GitHubPublisher) Publish ¶
func (g *GitHubPublisher) Publish(req publisher.PublishRequest) (publisher.PublishResult, error)
Publish sends Holon outputs to GitHub PR.
func (*GitHubPublisher) Validate ¶
func (g *GitHubPublisher) Validate(req publisher.PublishRequest) error
Validate checks if the request is valid for this publisher.
type PRFixData ¶
type PRFixData struct {
ReviewReplies []ReviewReply `json:"review_replies"`
FollowUpIssues []FollowUpIssue `json:"follow_up_issues,omitempty"`
Checks []CheckRun `json:"checks"`
}
PRFixData represents the parsed pr-fix.json file.
type PRRef ¶
PRRef represents a parsed GitHub PR reference. Supports formats: "owner/repo/pr/123", "owner/repo#123", "owner/repo/pull/123"
func ParsePRRef ¶
ParsePRRef parses a PR reference string into its components. Supported formats:
- owner/repo/pr/123
- owner/repo#123
- owner/repo/pull/123
type PublishResult ¶
type PublishResult struct {
// Summary comment result
SummaryComment CommentResult `json:"summary_comment"`
// Review replies results
ReviewReplies ReviewRepliesResult `json:"review_replies"`
// Overall success
Success bool `json:"success"`
}
PublishResult contains the outcome of a GitHub publish operation.
type ReplyResult ¶
type ReplyResult struct {
CommentID int64 `json:"comment_id"`
Status string `json:"status"` // "posted", "skipped", "failed"
Reason string `json:"reason,omitempty"`
}
ReplyResult represents the result of posting a single review reply.
type ReviewRepliesResult ¶
type ReviewRepliesResult struct {
Total int `json:"total"`
Posted int `json:"posted"`
Skipped int `json:"skipped"`
Failed int `json:"failed"`
Details []ReplyResult `json:"details,omitempty"`
}
ReviewRepliesResult represents the aggregated results of posting review replies.
type ReviewReply ¶
type ReviewReply struct {
CommentID int64 `json:"comment_id"`
Status string `json:"status"` // "fixed", "wontfix", "need-info", "deferred"
Message string `json:"message"`
ActionTaken *string `json:"action_taken,omitempty"`
}
ReviewReply represents a single review comment reply from pr-fix.json.