Show More
@@ -125,6 +125,8 b' class SlackIntegrationType(IntegrationTy' | |||||
125 | text = '*%s* caused a *%s* event' % ( |
|
125 | text = '*%s* caused a *%s* event' % ( | |
126 | data['actor']['username'], event.name) |
|
126 | data['actor']['username'], event.name) | |
127 |
|
127 | |||
|
128 | log.debug('handling slack event for %s' % event.name) | |||
|
129 | ||||
128 | if isinstance(event, events.PullRequestEvent): |
|
130 | if isinstance(event, events.PullRequestEvent): | |
129 | text = self.format_pull_request_event(event, data) |
|
131 | text = self.format_pull_request_event(event, data) | |
130 | elif isinstance(event, events.RepoPushEvent): |
|
132 | elif isinstance(event, events.RepoPushEvent): | |
@@ -190,6 +192,7 b' def html_to_slack_links(message):' | |||||
190 |
|
192 | |||
191 | @task(ignore_result=True) |
|
193 | @task(ignore_result=True) | |
192 | 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']) | |||
193 | resp = requests.post(settings['service'], json={ |
|
196 | resp = requests.post(settings['service'], json={ | |
194 | "channel": settings.get('channel', ''), |
|
197 | "channel": settings.get('channel', ''), | |
195 | "username": settings.get('username', 'Rhodecode'), |
|
198 | "username": settings.get('username', 'Rhodecode'), |
General Comments 0
You need to be logged in to leave comments.
Login now