Monorepo for Tangled tangled.org

appview: replace PullComment to Comment #1273

open opened by boltless.me targeting master from sl/comment

Including db migration to migrate issue_comments and pull_comments to unified comments table.

Signed-off-by: Seongmin Lee git@boltless.me

Labels

None yet.

assignee

None yet.

Participants 2
AT URI
at://did:plc:xasnlahkri4ewmbuzly2rlc5/sh.tangled.repo.pull/3mimbhgiqc722
+3 -3
Interdiff #2 #3
+1 -1
appview/db/comments.go
··· 174 174 if err != nil { 175 175 return nil, err 176 176 } 177 + defer rows.Close() 177 178 178 179 for rows.Next() { 179 180 var comment models.Comment ··· 240 241 if err := rows.Err(); err != nil { 241 242 return nil, err 242 243 } 243 - defer rows.Close() 244 244 245 245 sort.Slice(comments, func(i, j int) bool { 246 246 return comments[i].Created.Before(comments[j].Created)
appview/db/db.go

This file has not been changed.

appview/db/pulls.go

This file has not been changed.

+2 -2
appview/db/reference.go
··· 134 134 and p.pull_id = inp.pull_id 135 135 left join comments c 136 136 on inp.comment_id is not null 137 - and c.subject_at = ('at://' || p.owner_did || '/' || 'sh.tangled.repo.pull' || '/' || p.rkey) 137 + and c.subject_uri = ('at://' || p.owner_did || '/' || 'sh.tangled.repo.pull' || '/' || p.rkey) 138 138 and c.id = inp.comment_id 139 139 `, 140 140 strings.Join(vals, ","), ··· 438 438 join pulls p 439 439 on r.at_uri = p.repo_at 440 440 join comments c 441 - on ('at://' || p.owner_did || '/' || 'sh.tangled.repo.pull' || '/' || p.rkey) = c.subject_at 441 + on ('at://' || p.owner_did || '/' || 'sh.tangled.repo.pull' || '/' || p.rkey) = c.subject_uri 442 442 where %s and %s`, 443 443 filter.Condition(), 444 444 exclude.Condition(),
appview/ingester.go

This file has not been changed.

appview/models/comment.go

This file has not been changed.

appview/models/pull.go

This file has not been changed.

appview/notify/db/db.go

This file has not been changed.

appview/notify/logging/notifier.go

This file has not been changed.

appview/notify/merged_notifier.go

This file has not been changed.

appview/notify/notifier.go

This file has not been changed.

appview/notify/posthog/notifier.go

This file has not been changed.

appview/oauth/scopes.go

This file has not been changed.

appview/pages/templates/repo/pulls/pull.html

This file has not been changed.

appview/pulls/pulls.go

This file has not been changed.

appview/state/state.go

This file has not been changed.

History

10 rounds 8 comments
sign up or login to add to the discussion
1 commit
expand
appview: replace PullComment to Comment
3/3 failed
expand
no conflicts, ready to merge
expand 0 comments
1 commit
expand
appview: replace PullComment to Comment
3/3 failed
expand
expand 0 comments
1 commit
expand
appview: replace PullComment to Comment
3/3 failed
expand
expand 0 comments
1 commit
expand
appview: replace PullComment to Comment
3/3 failed
expand
expand 0 comments
1 commit
expand
appview: replace PullComment to Comment
3/3 failed
expand
expand 0 comments
1 commit
expand
appview: replace PullComment to Comment
3/3 failed
expand
expand 0 comments
1 commit
expand
appview: replace PullComment to Comment
3/3 failed
expand
expand 2 comments

appview/models/comment.go:144 won't this always be non-nil, which means issue comments might get a pull round in the record?

appview/ingester.go:1073 maybe this should resolve mentions from the original instead of processed

1 commit
expand
appview: replace PullComment to Comment
3/3 failed
expand
expand 6 comments

appview/db/reference.go:137 is this supposed to be subject_uri as per the db?

Good spot! I completely missed it. Thanks

there's that one instance and a couple others I think

appview/ingester.go:1036 we could make a notification in this function right? :p

appview/db/comments.go:243 I think this should be before the rows loop, maybe

we could make a notification in this function right? :p

yeah, I was going to introduce that after #1275 and forgot to do that.

I think this should be before the rows loop, maybe

good spot. will fix

1 commit
expand
appview: replace PullComment to Comment
3/3 failed
expand
expand 0 comments
1 commit
expand
appview: replace PullComment to Comment
3/3 failed
expand
expand 0 comments