mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
webhooks: Eliminate the usage of a headers.py file.
For storing HTTP headers as a function of fixture name, previously we required that the fixture_to_headers method should reside in a separate module called headers.py. However, as in many cases, this method will only take a few lines, we decided to move this function into the view.py file of the integration instead of requiring a whole new file called headers.py This commit introduces the small change in the system architecture, migrates the GitHub integration, and updates the docs accordingly.
This commit is contained in:
committed by
Tim Abbott
parent
4691028097
commit
ef52aa0fc1
@@ -16,6 +16,10 @@ from zerver.lib.webhooks.git import CONTENT_MESSAGE_TEMPLATE, \
|
||||
get_pull_request_event_message, get_push_commits_event_message, \
|
||||
get_push_tag_event_message, get_setup_webhook_message
|
||||
from zerver.models import UserProfile
|
||||
from zerver.lib.webhooks.common import \
|
||||
get_http_headers_from_filename
|
||||
|
||||
fixture_to_headers = get_http_headers_from_filename("HTTP_X_GITHUB_EVENT")
|
||||
|
||||
class UnknownEventType(Exception):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user