Monorepo for Tangled tangled.org

appview: replace PullComment to Comment #865

open opened by boltless.me targeting master from sl/wnrvrwyvrlzo
Labels

None yet.

assignee

None yet.

Participants 2
AT URI
at://did:plc:xasnlahkri4ewmbuzly2rlc5/sh.tangled.repo.pull/3m7iohv2yb422
+4 -3
Interdiff #0 #1
+4 -3
appview/db/comments.go
··· 11 12 "github.com/bluesky-social/indigo/atproto/syntax" 13 "tangled.org/core/appview/models" 14 ) 15 16 func PutComment(tx *sql.Tx, c *models.Comment) error { ··· 62 return nil 63 } 64 65 - func DeleteComments(e Execer, filters ...filter) error { 66 var conditions []string 67 var args []any 68 for _, filter := range filters { ··· 81 return err 82 } 83 84 - func GetComments(e Execer, filters ...filter) ([]models.Comment, error) { 85 commentMap := make(map[string]*models.Comment) 86 87 var conditions []string ··· 174 175 // collect references from each comments 176 commentAts := slices.Collect(maps.Keys(commentMap)) 177 - allReferencs, err := GetReferencesAll(e, FilterIn("from_at", commentAts)) 178 if err != nil { 179 return nil, fmt.Errorf("failed to query reference_links: %w", err) 180 }
··· 11 12 "github.com/bluesky-social/indigo/atproto/syntax" 13 "tangled.org/core/appview/models" 14 + "tangled.org/core/orm" 15 ) 16 17 func PutComment(tx *sql.Tx, c *models.Comment) error { ··· 63 return nil 64 } 65 66 + func DeleteComments(e Execer, filters ...orm.Filter) error { 67 var conditions []string 68 var args []any 69 for _, filter := range filters { ··· 82 return err 83 } 84 85 + func GetComments(e Execer, filters ...orm.Filter) ([]models.Comment, error) { 86 commentMap := make(map[string]*models.Comment) 87 88 var conditions []string ··· 175 176 // collect references from each comments 177 commentAts := slices.Collect(maps.Keys(commentMap)) 178 + allReferencs, err := GetReferencesAll(e, orm.FilterIn("from_at", commentAts)) 179 if err != nil { 180 return nil, fmt.Errorf("failed to query reference_links: %w", err) 181 }
appview/db/db.go

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

appview/db/pulls.go

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

appview/db/reference.go

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

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 patch was likely rebased, as context lines do not match.

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/pages/templates/repo/pulls/pull.html

This file has not been changed.

appview/pulls/opengraph.go

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

appview/pulls/pulls.go

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

History

8 rounds 4 comments
sign up or login to add to the discussion
1 commit
expand
appview: replace PullComment to Comment
2/3 timeout, 1/3 success
expand
merge conflicts detected
expand
  • appview/notify/db/db.go:260
  • appview/notify/merged_notifier.go:81
  • appview/notify/notifier.go:22
  • appview/pulls/opengraph.go:277
expand 0 comments
1 commit
expand
appview: replace PullComment to Comment
2/3 failed, 1/3 success
expand
expand 0 comments
1 commit
expand
appview: replace PullComment to Comment
3/3 success
expand
expand 0 comments
1 commit
expand
appview: replace PullComment to Comment
3/3 success
expand
expand 1 comment

here, the sort order is reversed, it should be .Before.

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

here will this delete all comments made on tangled thus far? don't think this is the right approach if so.

I should've been more precise about my expression. Existing comments won't be dropped as they are stored in issue_comments and pull_comments table (I'm just dropping legacy table with same name there), but yeah this PR itself doesn't include the backward compatibility layer yet so old comments won't be rendered.

Honestly this PR hasn't been updated since you two suggested to just ingest old records. I'll push more commits on top of this stack.

As a side note: I'd suggest to not publish the new sh.tangled.comment lexicon yet.

This unified comment record can be used for PR review comments and it might make us to modify the schema again. I think it would be safest to publish this when PR redesign discussion is finished.

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