forked from danielkappelle/bitbucket-mattermost-bridge
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.py
21 lines (16 loc) · 766 Bytes
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import os
# Config file, please set the following settings:
# host the bridge is listening for, default: 0.0.0.0
host = os.environ.get('BRIDGE_LISTEN_ADDR', '0.0.0.0')
# listening port, default 5000
port = os.environ.get('BRIDGE_LISTEN_POST', 5000)
# url to post bridged webhooks to
webhook_url = os.environ.get('MATTERMOST_HOOK', '')
if not webhook_url:
raise Exception('You need to set MATTERMOST_HOOK environment variable')
# Username showed in mattermost message
# "Enable Overriding of Usernames from Webhooks" must be turned on to work
username = os.environ.get('MATTERMOST_USERNAME', 'webhook')
# User icon showed in mattermost message
# "Enable Overriding of Icon from Webhooks" must be turned on to work
icon = os.environ.get('MATTERMOST_ICON', '')