From 929184f386b81f5829b8cedffd87fecc68fc35c3 Mon Sep 17 00:00:00 2001 From: Marcin Kuzminski Date: Thu, 28 Sep 2017 14:24:43 +0200 Subject: [PATCH] webhook: improve spelling and help text. --- rhodecode/integrations/types/webhook.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/rhodecode/integrations/types/webhook.py b/rhodecode/integrations/types/webhook.py index 7d8b27b6..dbc7a9c7 100644 --- a/rhodecode/integrations/types/webhook.py +++ b/rhodecode/integrations/types/webhook.py @@ -165,7 +165,7 @@ class WebhookSettingsSchema(colander.Schema): colander.String(), title=_('Webhook URL'), description= - _('URL of the webhook to receive POST event. Following variables ' + _('URL to which Webhook should submit data. Following variables ' 'are allowed to be used: {vars}. Some of the variables would ' 'trigger multiple calls, like ${{branch}} or ${{commit_id}}. ' 'Webhook will be called as many times as unique objects in ' @@ -180,8 +180,8 @@ class WebhookSettingsSchema(colander.Schema): secret_token = colander.SchemaNode( colander.String(), title=_('Secret Token'), - description=_('String used to validate received payloads. It will be ' - 'sent together with event data in JSON'), + description=_('Optional string used to validate received payloads. ' + 'It will be sent together with event data in JSON'), default='', missing='', widget=deform.widget.TextInputWidget( @@ -211,7 +211,7 @@ class WebhookSettingsSchema(colander.Schema): method_type = colander.SchemaNode( colander.String(), title=_('Call Method'), - description=_('Select if the webhook call should be made ' + description=_('Select if the Webhook call should be made ' 'with POST or GET.'), default='post', missing='', @@ -225,7 +225,7 @@ class WebhookSettingsSchema(colander.Schema): class WebhookIntegrationType(IntegrationTypeBase): key = 'webhook' display_name = _('Webhook') - description = _('Post json events to a webhook endpoint') + description = _('Post json events to a Webhook endpoint') icon = '''''' valid_events = [ @@ -254,7 +254,7 @@ class WebhookIntegrationType(IntegrationTypeBase): return schema def send_event(self, event): - log.debug('handling event %s with webhook integration %s', + log.debug('handling event %s with Webhook integration %s', event.name, self) if event.__class__ not in self.valid_events: @@ -306,11 +306,11 @@ def post_to_webhook(url_calls, settings): headers = headers or {} call_headers.update(headers) - log.debug('calling WEBHOOK with method: %s', call_method) + log.debug('calling Webhook with method: %s', call_method) resp = call_method(url, json={ 'token': token, 'event': data }, headers=call_headers) - log.debug('Got WEBHOOK response: %s', resp) + log.debug('Got Webhook response: %s', resp) resp.raise_for_status() # raise exception on a failed request