Add a vulnerability_found event for notice when we detect a vuln
Fixes #637 Note: This PR does *not* actually raise the event; it merely adds support for it
This commit is contained in:
parent
3677947521
commit
0f3db709ea
19 changed files with 476 additions and 159 deletions
|
@ -57,6 +57,10 @@ class RepositoryNotificationList(RepositoryParamResource):
|
|||
'type': 'object',
|
||||
'description': 'JSON config information for the specific method of notification'
|
||||
},
|
||||
'eventConfig': {
|
||||
'type': 'object',
|
||||
'description': 'JSON config information for the specific event of notification',
|
||||
},
|
||||
'title': {
|
||||
'type': 'string',
|
||||
'description': 'The human-readable title of the notification',
|
||||
|
@ -84,6 +88,7 @@ class RepositoryNotificationList(RepositoryParamResource):
|
|||
|
||||
new_notification = model.notification.create_repo_notification(repo, parsed['event'],
|
||||
parsed['method'], parsed['config'],
|
||||
parsed['eventConfig'],
|
||||
parsed.get('title', None))
|
||||
|
||||
resp = notification_view(new_notification)
|
||||
|
|
Reference in a new issue