Versions in this module Expand all Collapse all v1 v1.14.0 Nov 4, 2024 Changes in this version + const PluginName + func NewSource(version string) source.Source + func RenderGoTpl(tpl string, data any) (string, error) + func WithCustomPreview(previewTpl string) templates.MessageMutatorOption + func WithExtraButtons(btns []ExtraButton) templates.MessageMutatorOption + type CommonEvent interface + GetEvent func() *github.Event + ParsePayload func() (payload any, err error) + Type func() string + type Config struct + GitHub gh.ClientConfig + Log config.Logger + RefreshDuration time.Duration + Repositories []RepositoryConfig + func MergeConfigs(configs []*source.Config) (Config, error) + type EventsAPIMatcher struct + JSONPath string + NotificationTemplate NotificationTemplate + Type string + Value string + type ExtraButton struct + CommandTpl string + DisplayName string + Style string + URL string + type FilePatterns struct + Exclude []string + Include []string + type GitHubEvent struct + func (g *GitHubEvent) GetEvent() *github.Event + func (g *GitHubEvent) Type() string + type GitHubPullRequest struct + RepoName string + func (g *GitHubPullRequest) GetEvent() *github.Event + func (g *GitHubPullRequest) ParsePayload() (any, error) + func (g *GitHubPullRequest) Type() string + type IncludeExcludeRegex struct + Exclude []string + Include []string + func (r *IncludeExcludeRegex) IsDefined(value string) (bool, error) + func (r *IncludeExcludeRegex) IsEmpty() bool + type JSONPathMatcher struct + func NewJSONPathMatcher(log logrus.FieldLogger) *JSONPathMatcher + func (j *JSONPathMatcher) IsEventMatchingCriteria(obj json.RawMessage, jsonPath, expValue string) bool + type NotificationTemplate struct + ExtraButtons []ExtraButton + PreviewTpl string + func (t NotificationTemplate) ToOptions() []templates.MessageMutatorOption + type On struct + EventsAPI []EventsAPIMatcher + PullRequests []PullRequest + type PullRequest struct + Labels IncludeExcludeRegex + NotificationTemplate NotificationTemplate + Paths IncludeExcludeRegex + Types []string + type PullRequestMatcher struct + func NewPullRequestMatcher(log logrus.FieldLogger, cli *github.Client) *PullRequestMatcher + func (w *PullRequestMatcher) IsEventMatchingCriteria(ctx context.Context, criteria PullRequest, pullRequest *github.PullRequest) bool + type RepositoryConfig struct + BeforeDuration time.Duration + Name string + OnMatchers On + type Source struct + func (s *Source) Metadata(_ context.Context) (api.MetadataOutput, error) + func (s *Source) Stream(ctx context.Context, input source.StreamInput) (source.StreamOutput, error) + type Watcher struct + func NewWatcher(refreshDuration time.Duration, repositories []RepositoryConfig, ...) (*Watcher, error) + func (w *Watcher) AsyncConsumeEvents(ctx context.Context, stream *source.StreamOutput) + func (w *Watcher) List(ctx context.Context, owner string, repo string, ...) ([]*github.PullRequest, *github.Response, error)