parent
3f6f5162e8
commit
84276ee945
10 changed files with 89 additions and 12 deletions
|
@ -113,12 +113,12 @@ def delete_matching_notifications(target, kind_name, **kwargs):
|
|||
notification.delete_instance()
|
||||
|
||||
|
||||
def create_repo_notification(repo, event_name, method_name, config):
|
||||
def create_repo_notification(repo, event_name, method_name, config, title=None):
|
||||
event = ExternalNotificationEvent.get(ExternalNotificationEvent.name == event_name)
|
||||
method = ExternalNotificationMethod.get(ExternalNotificationMethod.name == method_name)
|
||||
|
||||
return RepositoryNotification.create(repository=repo, event=event, method=method,
|
||||
config_json=json.dumps(config))
|
||||
config_json=json.dumps(config), title=title)
|
||||
|
||||
|
||||
def get_repo_notification(uuid):
|
||||
|
|
Reference in a new issue