Monorepo for Tangled tangled.org
6

Configure Feed

Select the types of activity you want to include in your feed.

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 DeleteRepo(ctx context.Context, repo *models.Repo) 13 RenameRepo(ctx context.Context, actor syntax.DID, oldRepo, newRepo *models.Repo) 14 15 NewStar(ctx context.Context, star *models.Star) 16 DeleteStar(ctx context.Context, star *models.Star) 17 18 NewIssue(ctx context.Context, issue *models.Issue, mentions []syntax.DID) 19 NewIssueComment(ctx context.Context, comment *models.IssueComment, 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 NewPullComment(ctx context.Context, comment *models.PullComment, mentions []syntax.DID) 28 NewPullState(ctx context.Context, actor syntax.DID, pull *models.Pull) 29 30 NewIssueLabelOp(ctx context.Context, issue *models.Issue) 31 NewPullLabelOp(ctx context.Context, pull *models.Pull) 32 33 UpdateProfile(ctx context.Context, profile *models.Profile) 34 35 NewString(ctx context.Context, s *models.String) 36 EditString(ctx context.Context, s *models.String) 37 DeleteString(ctx context.Context, did, rkey string) 38 39 Push(ctx context.Context, repo *models.Repo, ref, oldSha, newSha, committerDid string) 40 41 Clone(ctx context.Context, repo *models.Repo) 42} 43 44// BaseNotifier is a listener that does nothing 45type BaseNotifier struct{} 46 47var _ Notifier = &BaseNotifier{} 48 49func (m *BaseNotifier) NewRepo(ctx context.Context, repo *models.Repo) {} 50func (m *BaseNotifier) DeleteRepo(ctx context.Context, repo *models.Repo) {} 51func (m *BaseNotifier) RenameRepo(ctx context.Context, actor syntax.DID, oldRepo, newRepo *models.Repo) { 52} 53 54func (m *BaseNotifier) NewStar(ctx context.Context, star *models.Star) {} 55func (m *BaseNotifier) DeleteStar(ctx context.Context, star *models.Star) {} 56 57func (m *BaseNotifier) NewIssue(ctx context.Context, issue *models.Issue, mentions []syntax.DID) {} 58func (m *BaseNotifier) NewIssueComment(ctx context.Context, comment *models.IssueComment, mentions []syntax.DID) { 59} 60func (m *BaseNotifier) NewIssueState(ctx context.Context, actor syntax.DID, issue *models.Issue) {} 61func (m *BaseNotifier) DeleteIssue(ctx context.Context, issue *models.Issue) {} 62 63func (m *BaseNotifier) NewIssueLabelOp(ctx context.Context, issue *models.Issue) {} 64func (m *BaseNotifier) NewPullLabelOp(ctx context.Context, pull *models.Pull) {} 65 66func (m *BaseNotifier) NewFollow(ctx context.Context, follow *models.Follow) {} 67func (m *BaseNotifier) DeleteFollow(ctx context.Context, follow *models.Follow) {} 68 69func (m *BaseNotifier) NewPull(ctx context.Context, pull *models.Pull) {} 70func (m *BaseNotifier) NewPullComment(ctx context.Context, models *models.PullComment, mentions []syntax.DID) { 71} 72func (m *BaseNotifier) NewPullState(ctx context.Context, actor syntax.DID, pull *models.Pull) {} 73 74func (m *BaseNotifier) UpdateProfile(ctx context.Context, profile *models.Profile) {} 75 76func (m *BaseNotifier) NewString(ctx context.Context, s *models.String) {} 77func (m *BaseNotifier) EditString(ctx context.Context, s *models.String) {} 78func (m *BaseNotifier) DeleteString(ctx context.Context, did, rkey string) {} 79 80func (m *BaseNotifier) Push(ctx context.Context, repo *models.Repo, ref, oldSha, newSha, committerDid string) { 81} 82 83func (m *BaseNotifier) Clone(ctx context.Context, repo *models.Repo) {}