Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow skipping the who-resolved info in slack posts #4207

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import json
import typing

from django.conf import settings
from django.utils.text import Truncator

from apps.alerts.incident_appearance.renderers.base_renderer import AlertBaseRenderer, AlertGroupBaseRenderer
Expand Down Expand Up @@ -133,12 +134,13 @@ def render_alert_group_attachments(self):

# Attaching resolve information
if self.alert_group.resolved:
resolve_attachment = {
"fallback": "Resolved...",
"text": self.alert_group.get_resolve_text(mention_user=True),
"callback_id": "alert",
}
attachments.append(resolve_attachment)
if not settings.FEATURE_SKIP_SLACK_RESOLVED_BY:
resolve_attachment = {
"fallback": "Resolved...",
"text": self.alert_group.get_resolve_text(mention_user=True),
"callback_id": "alert",
}
attachments.append(resolve_attachment)
else:
if self.alert_group.acknowledged:
ack_attachment = {
Expand Down
1 change: 1 addition & 0 deletions engine/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
BASE_URL = os.environ.get("BASE_URL") # Root URL of OnCall backend

# Feature toggles
FEATURE_SKIP_SLACK_RESOLVED_BY = getenv_boolean("FEATURE_SKIP_SLACK_RESOLVED_BY", default=False)
FEATURE_LIVE_SETTINGS_ENABLED = getenv_boolean("FEATURE_LIVE_SETTINGS_ENABLED", default=True)
FEATURE_TELEGRAM_INTEGRATION_ENABLED = getenv_boolean("FEATURE_TELEGRAM_INTEGRATION_ENABLED", default=True)
FEATURE_TELEGRAM_LONG_POLLING_ENABLED = getenv_boolean("FEATURE_TELEGRAM_LONG_POLLING_ENABLED", default=False)
Expand Down