Documentation
¶
Overview ¶
Package bellows monitors open PRs for status changes, CI results, and reviews.
Bellows periodically polls all open PRs in the state DB and updates their status. It triggers downstream actions: CI fix workers, review comment forwarding, and PR lifecycle state tracking.
Index ¶
Constants ¶
const ( EventCIPassed = "ci_passed" EventCIFailed = "ci_failed" EventReviewApproved = "review_approved" EventReviewChanges = "review_changes_requested" EventPRMerged = "pr_merged" EventPRClosed = "pr_closed" EventPRConflicting = "pr_conflicting" )
Event types emitted by the Bellows monitor.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Monitor ¶
type Monitor struct {
// contains filtered or unexported fields
}
Monitor watches open PRs and dispatches events on status changes.
func New ¶
func New(db *state.DB, interval time.Duration, anvilPaths map[string]string, autoLearnRules func() bool) *Monitor
New creates a Bellows monitor. The autoLearnRules function is called on each PR merge to check whether warden rule learning is enabled, so hot-reloaded config changes take effect without restarting the daemon.
func (*Monitor) ResetPRState ¶
ResetPRState clears the internal status cache for a PR. This should be called when a PR is manually reset so that status changes (e.g. from failing back to passing) are re-detected on the next poll cycle even if the state is the same as it was before the reset.
func (*Monitor) UpdateAnvilPaths ¶
UpdateAnvilPaths replaces the set of monitored anvil paths. This is safe to call while Run is active and takes effect on the next poll cycle.