cinotify

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package cinotify provides CI notification service

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Notifier

type Notifier interface {
	NotifyCI(ctx context.Context, message string) error
}

Notifier is the interface for sending CI notifications

type Service

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

Service monitors CI status and sends notifications

func NewService

func NewService(client *ghlib.Client, notifier Notifier, config ServiceConfig) *Service

NewService creates a new CI notification service

func (*Service) GetCIStatus

func (s *Service) GetCIStatus(ctx context.Context, prNumber int) (*ghlib.CIResult, error)

GetCIStatus gets the current CI status for a PR

func (*Service) IsRunning

func (s *Service) IsRunning() bool

IsRunning returns true if the service is running

func (*Service) Start

func (s *Service) Start(ctx context.Context) error

Start begins the notification service

func (*Service) Stop

func (s *Service) Stop()

Stop stops the notification service

func (*Service) StopWatching

func (s *Service) StopWatching(prNumber int)

StopWatching stops watching a PR

func (*Service) WatchPR

func (s *Service) WatchPR(ctx context.Context, prNumber int) error

WatchPR starts watching a PR for CI completion

func (*Service) WatchingPRs

func (s *Service) WatchingPRs() []int

WatchingPRs returns the list of PRs being watched

type ServiceConfig

type ServiceConfig struct {
	// PollInterval is the interval between polling
	PollInterval time.Duration
	// Timeout is the maximum time to wait for CI completion
	Timeout time.Duration
}

ServiceConfig holds configuration for the CI notify service

func DefaultServiceConfig

func DefaultServiceConfig() ServiceConfig

DefaultServiceConfig returns default configuration

Jump to

Keyboard shortcuts

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