Add repo events attributes
-from event_manager.event import Event
+from event_manager.event import Event, Attribute
REPO_CREATED = 'repo.created'
-REPO_NEW_COMMIT = 'repo.new_commit' # attempt, fullfilled
+REPO_NEW_COMMIT = 'repo.new_commit'
class RepoCreatedEvent(Event):
type = REPO_CREATED
+ attributes = (
+ Attribute('repo_uuid', is_uuid=True),
+ Attribute('project_uuid', is_uuid=True),
+ Attribute('project_owner_uuid', is_uuid=True),
+ Attribute('actor_uuid', is_uuid=True)
+ )
class RepoNewCommitEvent(Event):
type = REPO_NEW_COMMIT
+ attributes = (
+ Attribute('repo_uuid', is_uuid=True),
+ Attribute('project_uuid', is_uuid=True),
+ Attribute('project_owner_uuid', is_uuid=True),
+ Attribute('actor_uuid', is_uuid=True),
+ Attribute('failed', is_required=False)
+ )
