Merge branch 'sanduhrs-webhooks'

remotes/origin/issue/4795/notification_even_they_are_disabled
David Barragán Merino 2016-09-27 10:41:46 +02:00
commit 4bece43bf8
3 changed files with 4 additions and 1 deletions

View File

@ -33,5 +33,6 @@ answer newbie questions, and generally made taiga that much better:
- Motius GmbH <mail@motius.de>
- Riccardo Coccioli <riccardo.coccioli@immobiliare.it>
- Ricky Posner <e@eposner.com>
- Stefan Auditor <stefan.auditor@erdfisch.de>
- Yamila Moreno <yamila.moreno@kaleidos.net>
- Yaser Alraddadi <yaser@yr.sa>

View File

@ -30,6 +30,7 @@
- Improve messages generated on webhooks input.
- Add mentions support in commit messages.
- Cleanup hooks code.
- Rework webhook signature header to align with larger implementations and defined [standards](https://superfeedr-misc.s3.amazonaws.com/pubsubhubbub-core-0.4.html\#authednotify). (thanks to [Stefan Auditor](https://github.com/sanduhrs))
- Add created-, modified-, finished- and finish_date queryset filters
- Support exact match, gt, gte, lt, lte
- added issues, tasks and userstories accordingly

View File

@ -66,7 +66,8 @@ def _send_request(webhook_id, url, key, data):
serialized_data = UnicodeJSONRenderer().render(data)
signature = _generate_signature(serialized_data, key)
headers = {
"X-TAIGA-WEBHOOK-SIGNATURE": signature,
"X-TAIGA-WEBHOOK-SIGNATURE": signature, # For backward compatibility
"X-Hub-Signature": "sha1={}".format(signature),
"Content-Type": "application/json"
}
request = requests.Request('POST', url, data=serialized_data, headers=headers)