A vibe coded tangled fork which supports pijul.
at d861bff51e1597cd6902ff3d8ff601c3b1bf1451 74 lines 3.1 kB view raw
1package notify 2 3import ( 4 "context" 5 6 "github.com/bluesky-social/indigo/atproto/syntax" 7 "tangled.org/core/appview/models" 8) 9 10type Notifier interface { 11 NewRepo(ctx context.Context, repo *models.Repo) 12 13 NewStar(ctx context.Context, star *models.Star) 14 DeleteStar(ctx context.Context, star *models.Star) 15 16 NewComment(ctx context.Context, comment *models.Comment) 17 DeleteComment(ctx context.Context, comment *models.Comment) 18 19 NewIssue(ctx context.Context, issue *models.Issue, mentions []syntax.DID) 20 NewIssueState(ctx context.Context, actor syntax.DID, issue *models.Issue) 21 DeleteIssue(ctx context.Context, issue *models.Issue) 22 23 NewFollow(ctx context.Context, follow *models.Follow) 24 DeleteFollow(ctx context.Context, follow *models.Follow) 25 26 NewPull(ctx context.Context, pull *models.Pull) 27 NewPullState(ctx context.Context, actor syntax.DID, pull *models.Pull) 28 29 NewIssueLabelOp(ctx context.Context, issue *models.Issue) 30 NewPullLabelOp(ctx context.Context, pull *models.Pull) 31 32 UpdateProfile(ctx context.Context, profile *models.Profile) 33 34 NewString(ctx context.Context, s *models.String) 35 EditString(ctx context.Context, s *models.String) 36 DeleteString(ctx context.Context, did, rkey string) 37 38 Push(ctx context.Context, repo *models.Repo, ref, oldSha, newSha, committerDid string) 39} 40 41// BaseNotifier is a listener that does nothing 42type BaseNotifier struct{} 43 44var _ Notifier = &BaseNotifier{} 45 46func (m *BaseNotifier) NewRepo(ctx context.Context, repo *models.Repo) {} 47 48func (m *BaseNotifier) NewStar(ctx context.Context, star *models.Star) {} 49func (m *BaseNotifier) DeleteStar(ctx context.Context, star *models.Star) {} 50 51func (m *BaseNotifier) NewComment(ctx context.Context, comment *models.Comment) {} 52func (m *BaseNotifier) DeleteComment(ctx context.Context, comment *models.Comment) {} 53 54func (m *BaseNotifier) NewIssue(ctx context.Context, issue *models.Issue, mentions []syntax.DID) {} 55func (m *BaseNotifier) NewIssueState(ctx context.Context, actor syntax.DID, issue *models.Issue) {} 56func (m *BaseNotifier) DeleteIssue(ctx context.Context, issue *models.Issue) {} 57 58func (m *BaseNotifier) NewIssueLabelOp(ctx context.Context, issue *models.Issue) {} 59func (m *BaseNotifier) NewPullLabelOp(ctx context.Context, pull *models.Pull) {} 60 61func (m *BaseNotifier) NewFollow(ctx context.Context, follow *models.Follow) {} 62func (m *BaseNotifier) DeleteFollow(ctx context.Context, follow *models.Follow) {} 63 64func (m *BaseNotifier) NewPull(ctx context.Context, pull *models.Pull) {} 65func (m *BaseNotifier) NewPullState(ctx context.Context, actor syntax.DID, pull *models.Pull) {} 66 67func (m *BaseNotifier) UpdateProfile(ctx context.Context, profile *models.Profile) {} 68 69func (m *BaseNotifier) NewString(ctx context.Context, s *models.String) {} 70func (m *BaseNotifier) EditString(ctx context.Context, s *models.String) {} 71func (m *BaseNotifier) DeleteString(ctx context.Context, did, rkey string) {} 72 73func (m *BaseNotifier) Push(ctx context.Context, repo *models.Repo, ref, oldSha, newSha, committerDid string) { 74}