# HG changeset patch # User Marcin Kuzminski # Date 2017-09-28 12:24:43 # Node ID ae8ba063315d41bbdb552e582a35c6faba5ee060 # Parent d1c488ba562de7dd7c959d3b1f93a8b0a21266dc webhook: improve spelling and help text. diff --git a/rhodecode/integrations/types/webhook.py b/rhodecode/integrations/types/webhook.py --- a/rhodecode/integrations/types/webhook.py +++ b/rhodecode/integrations/types/webhook.py @@ -165,7 +165,7 @@ class WebhookSettingsSchema(colander.Sch 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.Sch 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.Sch 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.Sch 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(Integration 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