Show More
@@ -192,11 +192,11 b' def html_to_slack_links(message):' | |||||
192 |
|
192 | |||
193 | @task(ignore_result=True) |
|
193 | @task(ignore_result=True) | |
194 | def post_text_to_slack(settings, text): |
|
194 | def post_text_to_slack(settings, text): | |
195 | log.debug('sending %s to slack %s' % (text, settings['service']) |
|
195 | log.debug('sending %s to slack %s' % (text, settings['service'])) | |
196 | resp = requests.post(settings['service'], json={ |
|
196 | resp = requests.post(settings['service'], json={ | |
197 | "channel": settings.get('channel', ''), |
|
197 | "channel": settings.get('channel', ''), | |
198 | "username": settings.get('username', 'Rhodecode'), |
|
198 | "username": settings.get('username', 'Rhodecode'), | |
199 | "text": text, |
|
199 | "text": text, | |
200 | "icon_emoji": settings.get('icon_emoji', ':studio_microphone:') |
|
200 | "icon_emoji": settings.get('icon_emoji', ':studio_microphone:') | |
201 | }) |
|
201 | }) | |
202 | resp.raise_for_status() # raise exception on a failed request |
|
202 | resp.raise_for_status() # raise exception on a failed request |
General Comments 0
You need to be logged in to leave comments.
Login now