aireview

package
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 4, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package aireview decides whether a webhook event from a "bot reviewer" (any account whose sender.type is "Bot") should have its Slack reaction suppressed. The detector is a tiny value object so callers can short- circuit cheaply when the feature flag is off.

The opt-in flag is global and defaults off; see internal/config. Detection is deliberately broad: GitHub's payload does not distinguish AI reviewers (Copilot, Claude, …) from scripted bots (dependabot, renovate, release-please, …), so operators who enable the flag accept that any non-human reviewer is silenced. See docs/operations.md for the trade-off.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Detector

type Detector struct {
	// contains filtered or unexported fields
}

Detector decides whether to suppress reactions for an event whose sender is a bot. Zero value is a disabled detector that never suppresses.

func NewDetector

func NewDetector(enabled bool) *Detector

NewDetector returns a Detector. When enabled is false, ShouldSuppress always returns false without inspecting its argument.

func (*Detector) ShouldSuppress

func (d *Detector) ShouldSuppress(senderType string) bool

ShouldSuppress reports whether a reaction for an event with the given sender.type should be skipped. Matches GitHub's literal "Bot" only.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL