Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions socket_basics/core/notification/ms_sentinel_notifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ def _send_sentinel_event(self, facts: Dict[str, Any], title: str, content: str)
logger.warning('MSSentinelNotifier: missing required configuration (workspace_id, shared_key)')
return

# Get repository and branch info from config (discovered by main logic)
repo = self.config.get('repository', 'Unknown')
branch = self.config.get('branch', 'Unknown')
# Get repository and branch info from facts (populated by NotificationManager)
repo = facts.get('repository', 'Unknown')
branch = facts.get('branch', 'Unknown')

# Create Sentinel event payload with pre-formatted content
event = {
Expand Down
6 changes: 3 additions & 3 deletions socket_basics/core/notification/ms_teams_notifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ def _send_teams_message(self, facts: Dict[str, Any], title: str, content: str) -
logger.warning('MSTeamsNotifier: no Teams webhook URL configured')
return

# Get repository and branch info from config (discovered by main logic)
repo = self.config.get('repository', 'Unknown')
branch = self.config.get('branch', 'Unknown')
# Get repository and branch info from facts (populated by NotificationManager)
repo = facts.get('repository', 'Unknown')
branch = facts.get('branch', 'Unknown')

try:
# Create Teams MessageCard payload with pre-formatted content
Expand Down
6 changes: 3 additions & 3 deletions socket_basics/core/notification/slack_notifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ def _send_slack_message(self, facts: Dict[str, Any], title: str, content: str, f
logger.warning('SlackNotifier: no Slack webhook URL configured')
return

# Get repository and branch info from config (discovered by main logic)
repo = self.repository
branch = self.config.get('branch', 'Unknown')
# Get repository and branch info from facts (populated by NotificationManager)
repo = facts.get('repository', self.repository)
branch = facts.get('branch', 'Unknown')

try:
# Truncate content if it's too long for a single Slack block (3000 char limit)
Expand Down
6 changes: 3 additions & 3 deletions socket_basics/core/notification/sumologic_notifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ def _send_sumologic_log(self, facts: Dict[str, Any], title: str, content: str) -
logger.warning('SumoLogicNotifier: no HTTP source URL configured')
return

# Get repository and branch info from config (discovered by main logic)
repo = self.config.get('repository', 'Unknown')
branch = self.config.get('branch', 'Unknown')
# Get repository and branch info from facts (populated by NotificationManager)
repo = facts.get('repository', 'Unknown')
branch = facts.get('branch', 'Unknown')

# Add full scan URL if available
full_scan_url = facts.get('full_scan_url')
Expand Down
6 changes: 3 additions & 3 deletions socket_basics/core/notification/webhook_notifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ def _send_webhook(self, facts: Dict[str, Any], title: str, content: str) -> None
logger.warning('WebhookNotifier: no webhook URL configured')
return

# Get repository and branch info from config (discovered by main logic)
repo = self.config.get('repository', 'Unknown')
branch = self.config.get('branch', 'Unknown')
# Get repository and branch info from facts (populated by NotificationManager)
repo = facts.get('repository', 'Unknown')
branch = facts.get('branch', 'Unknown')

# Create webhook payload with pre-formatted content
payload = {
Expand Down