rules

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyRules

func ApplyRules(ctx context.Context, requests []githubclient.ReviewRequest, rules []Rule) []ping.PingRequest

Each rule can override the global delay for specific reviewers matching the glob pattern It also updates the Delay, Enabled, ShouldPing, and Integrations field for each request.

func ParseGlobalIntegrations

func ParseGlobalIntegrations() []ping.Integration

ParseGlobalIntegrations extracts global integration configurations from viper

func ParseIntegration

func ParseIntegration(intgMap map[string]interface{}) ping.Integration

ParseIntegration parses a single integration configuration from viper

Types

type Rule

type Rule struct {
	MatchName    string
	Delay        int
	Enabled      bool
	Integrations []ping.Integration // List of integrations for this rule
}

Rule represents a rule for matching reviewers with custom delays

func ParseRules

func ParseRules() []Rule

ParseRules extracts rules configuration from viper

Jump to

Keyboard shortcuts

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