Versions in this module Expand all Collapse all v1 v1.0.0 Jun 15, 2026 Changes in this version + const EventActivityDetected + const EventClosed + const EventMerged + const EventNewPullRequestDetected + const EventPipelineStatusChanged + const EventReviewStateChanged + const EventStatusChanged + var ErrInvalidPRIdentifier = errors.New("invalid pull request identifier") + func ActivityIgnoreFilter(cfg *IgnoreConfig, repo, eventName, author, eventDetail string) bool + type Activity struct + func NewActivity(prIdentifier PRIdentifier, activityType ActivityType, author Author, ...) *Activity + func (a *Activity) Author() Author + func (a *Activity) Body() string + func (a *Activity) CreatedAt() time.Time + func (a *Activity) PRIdentifier() PRIdentifier + func (a *Activity) Type() ActivityType + type ActivityCheckScheduler struct + func NewActivityCheckScheduler(recentThresholdHours int, staleCheckIntervalMin int) *ActivityCheckScheduler + func (s *ActivityCheckScheduler) DeterminePRsToCheck(prs []*PullRequest) *scheduleResult + func (s *ActivityCheckScheduler) MarkCheckedAt(now time.Time, prs []*PullRequest) + func (s *ActivityCheckScheduler) SeedLastChecked(url string, t time.Time) + type ActivityDetected struct + Activity *Activity + PullRequest *PullRequest + PullRequestID PRIdentifier + Repository RepositoryInfo + func NewActivityDetected(pr *PullRequest, activity *Activity) ActivityDetected + func NewActivityDetectedAt(pr *PullRequest, activity *Activity, at time.Time) ActivityDetected + func (e *ActivityDetected) Name() string + func (e ActivityDetected) OccurredAt() time.Time + type ActivityType string + const ActivityTypeComment + const ActivityTypeCommit + const ActivityTypePush + const ActivityTypeReaction + const ActivityTypeReview + type Author struct + func NewAuthor(login string) (Author, error) + func (a Author) Equals(other Author) bool + func (a Author) Login() string + func (a Author) String() string + type Closed struct + PullRequest *PullRequest + PullRequestID PRIdentifier + Repository RepositoryInfo + func NewClosed(pr *PullRequest) Closed + func NewClosedAt(pr *PullRequest, at time.Time) Closed + func (e *Closed) Name() string + func (e Closed) OccurredAt() time.Time + type Event interface + Name func() string + OccurredAt func() time.Time + type FilterFn func([]*PullRequest) []*PullRequest + func NewDraftFilter(includeDrafts bool) FilterFn + type IgnoreActorRule struct + Events []string + Except []string + Login string + type IgnoreConfig struct + Ignore IgnoreRuleSet + type IgnoreRuleSet struct + Global IgnoreScope + Repos map[string]IgnoreScope + type IgnoreScope struct + AuthoredBy []IgnoreActorRule + Events []string + Except []string + Repos []string + type Merged struct + PullRequest *PullRequest + PullRequestID PRIdentifier + Repository RepositoryInfo + func NewMerged(pr *PullRequest) Merged + func NewMergedAt(pr *PullRequest, at time.Time) Merged + func (e *Merged) Name() string + func (e Merged) OccurredAt() time.Time + type NewPullRequestDetected struct + Author Author + PullRequest *PullRequest + PullRequestID PRIdentifier + Repository RepositoryInfo + func NewNewPullRequestDetected(pr *PullRequest) NewPullRequestDetected + func NewNewPullRequestDetectedAt(pr *PullRequest, at time.Time) NewPullRequestDetected + func (e *NewPullRequestDetected) Name() string + func (e NewPullRequestDetected) OccurredAt() time.Time + type PRActivityData struct + Activities []*Activity + HeadCommitSHA *string + PipelineStatus *PipelineStatus + type PRIdentifier struct + func NewPRIdentifier(url string, number int) (PRIdentifier, error) + func (id PRIdentifier) Equals(other PRIdentifier) bool + func (id PRIdentifier) Number() int + func (id PRIdentifier) String() string + func (id PRIdentifier) URL() string + type PRStatus int + const StatusClosed + const StatusMerged + const StatusOpen + func (s *PRStatus) UnmarshalText(text []byte) error + func (s PRStatus) IsOpen() bool + func (s PRStatus) MarshalText() ([]byte, error) + func (s PRStatus) String() string + type PRTrackingRepository interface + Clear func() error + Fetch func(prIdentifier PRIdentifier) (*PullRequest, error) + IsEmpty func() bool + LoadAll func() ([]*PullRequest, error) + Save func(pullRequests []*PullRequest) error + Update func(pullRequest *PullRequest) error + type PipelineStatus int + const PipelineStatusFailed + const PipelineStatusRunning + const PipelineStatusSuccess + const PipelineStatusUnknown + func (p *PipelineStatus) UnmarshalText(text []byte) error + func (p PipelineStatus) Emoji() string + func (p PipelineStatus) Label() string + func (p PipelineStatus) MarshalText() ([]byte, error) + func (p PipelineStatus) String() string + type PipelineStatusChanged struct + NewStatus PipelineStatus + OldStatus PipelineStatus + PullRequest *PullRequest + PullRequestID PRIdentifier + Repository RepositoryInfo + func NewPipelineStatusChanged(pr *PullRequest, oldStatus, newStatus PipelineStatus) PipelineStatusChanged + func NewPipelineStatusChangedAt(pr *PullRequest, oldStatus, newStatus PipelineStatus, at time.Time) PipelineStatusChanged + func (e *PipelineStatusChanged) Name() string + func (e PipelineStatusChanged) OccurredAt() time.Time + type PullRequest struct + func ClassifyPRs(prs []*PullRequest, since time.Time) (trulyNew, withActivity []*PullRequest) + func NewPullRequest(url string, number int, title string, repository RepositoryInfo, author Author, ...) (*PullRequest, error) + func ReconstitutePR(identifier PRIdentifier, title string, repository RepositoryInfo, ...) *PullRequest + func (pr *PullRequest) Activities() []*Activity + func (pr *PullRequest) ActivitiesSince(since time.Time) []*Activity + func (pr *PullRequest) AddActivities(activities []*Activity) []Event + func (pr *PullRequest) AddActivity(activity *Activity) []Event + func (pr *PullRequest) AddReview(review *Review) []Event + func (pr *PullRequest) AgeAt(now time.Time) time.Duration + func (pr *PullRequest) Author() Author + func (pr *PullRequest) AuthorLogin() string + func (pr *PullRequest) ClearActivities() + func (pr *PullRequest) Close() []Event + func (pr *PullRequest) CreatedAt() time.Time + func (pr *PullRequest) Equals(other *PullRequest) bool + func (pr *PullRequest) HasActivitiesSince(since time.Time) bool + func (pr *PullRequest) HeadCommitSHA() string + func (pr *PullRequest) Identifier() PRIdentifier + func (pr *PullRequest) IsDraft() bool + func (pr *PullRequest) IsOpen() bool + func (pr *PullRequest) IsSeen() bool + func (pr *PullRequest) IsStaleAt(now time.Time, threshold time.Duration) bool + func (pr *PullRequest) LastActivityAt() time.Time + func (pr *PullRequest) LastActivityCheck() time.Time + func (pr *PullRequest) MarkAsNewlyDetected() []Event + func (pr *PullRequest) MarkAsSeen() + func (pr *PullRequest) MarkAsUnseen() + func (pr *PullRequest) Merge() []Event + func (pr *PullRequest) Number() int + func (pr *PullRequest) PipelineStatus() PipelineStatus + func (pr *PullRequest) RecordHeadCommitUpdate(newHeadSHA string) []Event + func (pr *PullRequest) RecordHeadCommitUpdateAt(newHeadSHA string, now time.Time) []Event + func (pr *PullRequest) Repository() RepositoryInfo + func (pr *PullRequest) RepositoryName() string + func (pr *PullRequest) ReviewSummary() *ReviewSummary + func (pr *PullRequest) Reviews() map[string]*Review + func (pr *PullRequest) Seen() bool + func (pr *PullRequest) SetHeadCommitSHA(sha string) + func (pr *PullRequest) SetInitialActivities(activities []*Activity) + func (pr *PullRequest) SetLastActivityCheck(t time.Time) + func (pr *PullRequest) SetPipelineStatus(status PipelineStatus) + func (pr *PullRequest) SetReviews(reviews map[string]*Review) + func (pr *PullRequest) Status() PRStatus + func (pr *PullRequest) Title() string + func (pr *PullRequest) URL() string + func (pr *PullRequest) UpdatePipelineStatus(newStatus PipelineStatus) []Event + type PullRequestRepository interface + AuthenticatedUser func() string + FetchActivities func(prs []*PullRequest, since time.Time) (map[string]PRActivityData, error) + FetchPRStatus func(owner, repo string, number int) (PRStatus, error) + FetchRequestedReviews func() ([]*PullRequest, error) + FetchUserCreated func() ([]*PullRequest, error) + type RepositoryInfo struct + func NewRepository(nameWithOwner string) (RepositoryInfo, error) + func (r RepositoryInfo) Equals(other RepositoryInfo) bool + func (r RepositoryInfo) Name() string + func (r RepositoryInfo) NameWithOwner() string + func (r RepositoryInfo) Owner() string + func (r RepositoryInfo) String() string + type Review struct + func NewReview(reviewer Author, state ReviewState, submittedAt time.Time) *Review + func (r *Review) Reviewer() Author + func (r *Review) State() ReviewState + func (r *Review) SubmittedAt() time.Time + type ReviewState int + const ReviewStateApproved + const ReviewStateChangesRequested + const ReviewStateCommented + const ReviewStateDismissed + func (rs *ReviewState) UnmarshalText(text []byte) error + func (rs ReviewState) Emoji() string + func (rs ReviewState) Label() string + func (rs ReviewState) MarshalText() ([]byte, error) + func (rs ReviewState) String() string + type ReviewStateChanged struct + PullRequest *PullRequest + PullRequestID PRIdentifier + Repository RepositoryInfo + Reviewer Author + State ReviewState + func NewReviewStateChanged(pr *PullRequest, reviewer Author, state ReviewState) ReviewStateChanged + func NewReviewStateChangedAt(pr *PullRequest, reviewer Author, state ReviewState, at time.Time) ReviewStateChanged + func (e *ReviewStateChanged) Name() string + func (e ReviewStateChanged) OccurredAt() time.Time + type ReviewSummary struct + func NewReviewSummary(reviews map[string]*Review) *ReviewSummary + func (rs *ReviewSummary) IsEmpty() bool + func (rs *ReviewSummary) ReviewersByState(state ReviewState) []string + func (rs *ReviewSummary) Reviews() map[string]*Review + type StatusChangeType string + const StatusChangeClosed + const StatusChangeMerged + type StatusChanged struct + NewStatus PRStatus + OldStatus PRStatus + PullRequestID PRIdentifier + func NewStatusChanged(pr *PullRequest, oldStatus, newStatus PRStatus) StatusChanged + func (e *StatusChanged) Name() string + func (e StatusChanged) OccurredAt() time.Time