Monorepo for Tangled tangled.org

appview/notify/db: refactor db notifier #680

merged opened by oppi.li targeting master from push-myrnwrtyvllw

additionaly: notifies collaborators on certain events:

  • issue: creation, closing
  • pull: creation, closing and merging

Signed-off-by: oppiliappan me@oppi.li

Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:qfpnj4og54vl56wngdriaxug/sh.tangled.repo.pull/3m3dftok5lg22
+5 -5
Interdiff #0 โ†’ #1
appview/db/collaborators.go

This file has not been changed.

appview/db/issues.go

This file has not been changed.

appview/issues/issues.go

This file has not been changed.

appview/models/issue.go

This file has not been changed.

appview/models/notifications.go

This file has not been changed.

+5 -5
appview/notify/db/db.go
··· 73 73 recipients = append(recipients, syntax.DID(issue.Repo.Did)) 74 74 collaborators, err := db.GetCollaborators(n.db, db.FilterEq("repo_at", issue.Repo.RepoAt())) 75 75 if err != nil { 76 - log.Printf("failed to fetch collaborators: %w", err) 76 + log.Printf("failed to fetch collaborators: %v", err) 77 77 return 78 78 } 79 79 for _, c := range collaborators { ··· 189 189 recipients = append(recipients, syntax.DID(repo.Did)) 190 190 collaborators, err := db.GetCollaborators(n.db, db.FilterEq("repo_at", repo.RepoAt())) 191 191 if err != nil { 192 - log.Printf("failed to fetch collaborators: %w", err) 192 + log.Printf("failed to fetch collaborators: %v", err) 193 193 return 194 194 } 195 195 for _, c := range collaborators { ··· 288 288 recipients = append(recipients, syntax.DID(issue.Repo.Did)) 289 289 collaborators, err := db.GetCollaborators(n.db, db.FilterEq("repo_at", issue.Repo.RepoAt())) 290 290 if err != nil { 291 - log.Printf("failed to fetch collaborators: %w", err) 291 + log.Printf("failed to fetch collaborators: %v", err) 292 292 return 293 293 } 294 294 for _, c := range collaborators { ··· 333 333 recipients = append(recipients, syntax.DID(repo.Did)) 334 334 collaborators, err := db.GetCollaborators(n.db, db.FilterEq("repo_at", repo.RepoAt())) 335 335 if err != nil { 336 - log.Printf("failed to fetch collaborators: %w", err) 336 + log.Printf("failed to fetch collaborators: %v", err) 337 337 return 338 338 } 339 339 for _, c := range collaborators { ··· 379 379 recipients = append(recipients, syntax.DID(repo.Did)) 380 380 collaborators, err := db.GetCollaborators(n.db, db.FilterEq("repo_at", repo.RepoAt())) 381 381 if err != nil { 382 - log.Printf("failed to fetch collaborators: %w", err) 382 + log.Printf("failed to fetch collaborators: %v", err) 383 383 return 384 384 } 385 385 for _, c := range collaborators {
appview/pages/templates/notifications/fragments/item.html

This file has not been changed.

History

2 rounds 0 comments
sign up or login to add to the discussion
oppi.li submitted #1
1 commit
expand
appview/notify/db: refactor db notifier
expand 0 comments
pull request successfully merged
oppi.li submitted #0
1 commit
expand
appview/notify/db: refactor db notifier
expand 0 comments