back interdiff of round #2 and #1

appview: introduce email notifications for @ mentions on issue/pr comments #393

closed
opened by boltless.me targeting master from boltless.me/core: feat/mentions

Stacked on top of #392

Yes, I know we have stacked PRs, but I want to explicitly separate two sets of commits and review both on different places

This is MVC implementation of email notification.

Still lot of parts are missing, but this is a PR with most basic features.

files
appview
REBASED
appview/middleware/middleware.go

This patch was likely rebased, as context lines do not match.

ERROR
appview/repo/artifact.go

Failed to calculate interdiff for this file.

ERROR
appview/repo/index.go

Failed to calculate interdiff for this file.

REBASED
appview/reporesolver/resolver.go

This patch was likely rebased, as context lines do not match.

REVERTED
appview/db/repos.go
··· 391 391 var description, spindle sql.NullString 392 392 393 393 row := e.QueryRow(` 394 + select did, name, knot, created, at_uri, description, spindle 394 - select did, name, knot, created, at_uri, description, spindle, rkey 395 395 from repos 396 396 where did = ? and name = ? 397 397 `, ··· 400 400 ) 401 401 402 402 var createdAt string 403 + if err := row.Scan(&repo.Did, &repo.Name, &repo.Knot, &createdAt, &repo.AtUri, &description, &spindle); err != nil { 403 - if err := row.Scan(&repo.Did, &repo.Name, &repo.Knot, &createdAt, &repo.AtUri, &description, &spindle, &repo.Rkey); err != nil { 404 404 return nil, err 405 405 } 406 406 createdAtTime, _ := time.Parse(time.RFC3339, createdAt) ··· 421 421 var repo Repo 422 422 var nullableDescription sql.NullString 423 423 424 + row := e.QueryRow(`select did, name, knot, created, at_uri, description from repos where at_uri = ?`, atUri) 424 - row := e.QueryRow(`select did, name, knot, created, at_uri, rkey, description from repos where at_uri = ?`, atUri) 425 425 426 426 var createdAt string 427 + if err := row.Scan(&repo.Did, &repo.Name, &repo.Knot, &createdAt, &repo.AtUri, &nullableDescription); err != nil { 427 - if err := row.Scan(&repo.Did, &repo.Name, &repo.Knot, &createdAt, &repo.AtUri, &repo.Rkey, &nullableDescription); err != nil { 428 428 return nil, err 429 429 } 430 430 createdAtTime, _ := time.Parse(time.RFC3339, createdAt) ··· 440 440 } 441 441 442 442 func AddRepo(e Execer, repo *Repo) error { 443 - if repo.AtUri == "" { 444 - repo.AtUri = repo.RepoAt().String() 445 - } 446 443 _, err := e.Exec( 447 444 `insert into repos 448 445 (did, name, knot, rkey, at_uri, description, source)
ERROR
appview/pages/markup/markdown.go

Failed to calculate interdiff for this file.

ERROR
appview/pages/markup/markdown_at_extension.go

Failed to calculate interdiff for this file.

ERROR
appview/pulls/pulls.go

Failed to calculate interdiff for this file.

NEW
appview/db/star.go
··· 196 196 r.name, 197 197 r.knot, 198 198 r.rkey, 199 - r.created, 200 - r.at_uri 199 + r.created 201 200 from stars s 202 201 join repos r on s.repo_at = r.at_uri 203 202 `) ··· 222 221 &repo.Knot, 223 222 &repo.Rkey, 224 223 &repoCreatedAt, 225 - &repo.AtUri, 226 224 ); err != nil { 227 225 return nil, err 228 226 }