appview/indexer: handle NewIssueClosed #695

merged
opened by boltless.me targeting master from boltless.me/core: feat/search

Doesn't suport issue reopen yet

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

Changed files
+9
appview
indexer
+9
appview/indexer/notifier.go
···
}
}
+
func (ix *Indexer) NewIssueClosed(ctx context.Context, issue *models.Issue) {
+
l := log.FromContext(ctx).With("notifier", "indexer.NewIssueClosed", "issue", issue)
+
l.Debug("updating an issue")
+
err := ix.Issues.Index(ctx, *issue)
+
if err != nil {
+
l.Error("failed to index an issue", "err", err)
+
}
+
}
+
func (ix *Indexer) DeleteIssue(ctx context.Context, issue *models.Issue) {
l := log.FromContext(ctx).With("notifier", "indexer.DeleteIssue", "issue", issue)
l.Debug("deleting an issue")