Signed-off-by: dusk y.bera003.06@protonmail.com
+16
-13
appview/repo/repo.go
+16
-13
appview/repo/repo.go
···
315
315
return nil, err
316
316
}
317
317
318
-
for _, round := range pull.Submissions {
319
-
item := &feeds.Item{
320
-
Title: fmt.Sprintf("[PR #%d] %s (round #%d)", pull.PullId, pull.Title, round.RoundNumber),
321
-
Description: fmt.Sprintf("@%s submitted changes (at round #%d) on PR #%d in %s", owner.Handle, round.RoundNumber, pull.PullId, f.OwnerSlashRepo()),
322
-
Link: &feeds.Link{Href: fmt.Sprintf("%s/%s/pulls/%d", rp.config.Core.AppviewHost, f.OwnerSlashRepo(), pull.PullId)},
323
-
Created: pull.Created,
324
-
Author: &feeds.Author{
325
-
Name: fmt.Sprintf("@%s", owner.Handle),
326
-
},
327
-
}
328
-
feed.Items = append(feed.Items, item)
329
-
}
330
-
331
318
var state string
332
319
if pull.State == db.PullOpen {
333
320
state = "opened"
···
348
335
},
349
336
}
350
337
feed.Items = append(feed.Items, item)
338
+
339
+
for _, round := range pull.Submissions {
340
+
if round == nil || round.RoundNumber == 0 {
341
+
continue
342
+
}
343
+
item := &feeds.Item{
344
+
Title: fmt.Sprintf("[PR #%d] %s (round #%d)", pull.PullId, pull.Title, round.RoundNumber),
345
+
Description: fmt.Sprintf("@%s submitted changes (at round #%d) on PR #%d in %s", owner.Handle, round.RoundNumber, pull.PullId, f.OwnerSlashRepo()),
346
+
Link: &feeds.Link{Href: fmt.Sprintf("%s/%s/pulls/%d/round/%d/", rp.config.Core.AppviewHost, f.OwnerSlashRepo(), pull.PullId, round.RoundNumber)},
347
+
Created: round.Created,
348
+
Author: &feeds.Author{
349
+
Name: fmt.Sprintf("@%s", owner.Handle),
350
+
},
351
+
}
352
+
feed.Items = append(feed.Items, item)
353
+
}
351
354
}
352
355
353
356
for _, issue := range issues {
appview/repo/router.go
appview/repo/router.go
This file has not been changed.
History
5 rounds
4 comments
expand 1 comment
pull request successfully merged
expand 0 comments
expand 0 comments
expand 1 comment
this is pretty simple for now (only puts pull and issue creation in), like the profile timeline since i assume this could use the same code as notifications code later for keeping track of pulls / issues being closed etc etc
including submissions in the feed now aswell