Skip to content

Commit

Permalink
Add log line when skipping notification
Browse files Browse the repository at this point in the history
  • Loading branch information
scott-codecov committed Aug 28, 2023
1 parent 0bd45b4 commit 348d638
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions services/notification/notifiers/status/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,16 @@ async def notify(self, comparison: Comparison):
cache.get_backend().set(cache_key, ttl, payload)
return await self.send_notification(comparison, payload)
else:
log.info(
"Notification payload unchanged. Skipping notification.",
extra=dict(
repoid=head_commit.repoid,
base_commitid=base_commit.commitid if base_commit else None,
head_commitid=head_commit.commitid if head_commit else None,
notifier_name=self.name,
notifier_title=self.title,
),
)
return NotificationResult(
notification_attempted=False,
notification_successful=None,
Expand Down

0 comments on commit 348d638

Please sign in to comment.