Skip to content
Open
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: 6 additions & 0 deletions sentry_mattermost/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ def create(cls, plugin, notification):
"icon_url": "https://myovchev.github.io/sentry-slack/images/logo32.png", #noqa
"text": text
}
if plugin.get_option('channel', project):
payload["channel"] = plugin.get_option('channel', project)
return payload


Expand All @@ -99,6 +101,10 @@ class MattermostOptionsForm(notify.NotificationConfigurationForm):
help_text='Incoming Webhook URL',
widget=forms.URLInput(attrs={'class': 'span8'})
)
channel = forms.CharField(
help_text='Mattermost channel name, leave empty for default channel defined by webhook',
widget=forms.TextInput(attrs={'class': 'span8'})
)
include_rules = forms.BooleanField(
help_text='Include triggering rules with notifications',
required=False,
Expand Down