Documentation
¶
Overview ¶
Package cinotify provides CI notification service
Index ¶
- type Notifier
- type Service
- func (s *Service) GetCIStatus(ctx context.Context, prNumber int) (*ghlib.CIResult, error)
- func (s *Service) IsRunning() bool
- func (s *Service) Start(ctx context.Context) error
- func (s *Service) Stop()
- func (s *Service) StopWatching(prNumber int)
- func (s *Service) WatchPR(ctx context.Context, prNumber int) error
- func (s *Service) WatchingPRs() []int
- type ServiceConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 ¶
GetCIStatus gets the current CI status for a PR
func (*Service) StopWatching ¶
StopWatching stops watching a PR
func (*Service) WatchingPRs ¶
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
Click to show internal directories.
Click to hide internal directories.