allura.webhooks

class allura.webhooks.RepoPushWebhookSender
get_payload(commit_ids, **kw)

Return a dict with webhook payload

class allura.webhooks.WebhookController(sender, app, *args, **kw)
create_form

alias of WebhookCreateForm

edit_form

alias of WebhookEditForm

class allura.webhooks.WebhookCreateForm(*args, **kw)

Messages

badDictType:

The input must be dict-like (not a %(type)s: %(value)r)

badType:

The input must be a string (not a %(type)s: %(value)r)

empty:

Please enter a value

missingValue:

Missing value

noneType:

The input must be a string (not None)

notExpected:

The input field %(name)s was not expected.

singleValueExpected:

Please provide only one value

class allura.webhooks.WebhookEditForm(sender, app)

Messages

badDictType:

The input must be dict-like (not a %(type)s: %(value)r)

badType:

The input must be a string (not a %(type)s: %(value)r)

empty:

Please enter a value

missingValue:

Missing value

noneType:

The input must be a string (not None)

notExpected:

The input field %(name)s was not expected.

singleValueExpected:

Please provide only one value

class allura.webhooks.WebhookSender

Base class for webhook senders.

Subclasses are required to implement get_payload() and set type and triggered_by.

controller

alias of WebhookController

enforce_limit(app)

Checks if limit of webhooks created for given project/app is reached. Returns False if limit is reached, True otherwise.

get_payload(**kw)

Return a dict with webhook payload

send(params_or_list)

Post a task that will send webhook payload

Parameters:

params_or_list – dict with keyword parameters to be passed to get_payload() or a list of such dicts. If it’s a list for each element appropriate payload will be submitted, but limit will be enforced only once for each webhook.

class allura.webhooks.WebhookValidator(sender, app, **kw)

Messages

badType:

The input must be a string (not a %(type)s: %(value)r)

empty:

Please enter a value

noneType:

The input must be a string (not None)