Signed-off-by: dusk y.bera003.06@protonmail.com
+9
-1
appview/db/pulls.go
+9
-1
appview/db/pulls.go
···
419
419
inClause := strings.TrimSuffix(strings.Repeat("?, ", len(pulls)), ", ")
420
420
submissionsQuery := fmt.Sprintf(`
421
421
select
422
-
id, pull_id, round_number, patch, source_rev
422
+
id, pull_id, round_number, patch, created, source_rev
423
423
from
424
424
pull_submissions
425
425
where
···
445
445
for submissionsRows.Next() {
446
446
var s PullSubmission
447
447
var sourceRev sql.NullString
448
+
var createdAt string
448
449
err := submissionsRows.Scan(
449
450
&s.ID,
450
451
&s.PullId,
451
452
&s.RoundNumber,
452
453
&s.Patch,
454
+
&createdAt,
453
455
&sourceRev,
454
456
)
455
457
if err != nil {
456
458
return nil, err
457
459
}
458
460
461
+
createdTime, err := time.Parse(time.RFC3339, createdAt)
462
+
if err != nil {
463
+
return nil, err
464
+
}
465
+
s.Created = createdTime
466
+
459
467
if sourceRev.Valid {
460
468
s.SourceRev = sourceRev.String
461
469
}
History
3 rounds
5 comments
expand 1 comment
pull request successfully merged
expand 0 comments
expand 4 comments
why not use GetPulls with filters instead? we can additionally utilize things like comments and rounds in the feed.
right; i was going for no comments / rounds at first but that makes more sense!
(i think comments would be too noisy, thats best left to notifications IMO, but rounds would be fine)
removed that and modified GetPulls a bit and using that
submission created times were not being read from db, fixed