From 9fe2a582124543b232e6686d8aa254289b60c9ee Mon Sep 17 00:00:00 2001 From: Seongmin Lee Date: Wed, 22 Oct 2025 04:44:48 +0900 Subject: [PATCH] appview/indexer: handle `NewIssueClosed` Change-Id: qvnkuurwovnqrnsvztwqonrlsqypmwzp Doesn't suport issue reopen yet Signed-off-by: Seongmin Lee --- appview/indexer/notifier.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/appview/indexer/notifier.go b/appview/indexer/notifier.go index 61012c92..c7bd3aab 100644 --- a/appview/indexer/notifier.go +++ b/appview/indexer/notifier.go @@ -19,6 +19,15 @@ func (ix *Indexer) NewIssue(ctx context.Context, issue *models.Issue) { } } +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") -- 2.43.0