This is where the validation rules that run against the various repository categories live.
ActionValidationBase as the base class.validate or async_validate methods to define validation rules.ValidationException with the failure message.from .base import (
ActionValidationBase,
ValidationBase,
ValidationException,
)
class SuperAwesomeRepository(ActionValidationBase):
category = "integration"
async def async_validate(self):
if self.repository != "super-awesome":
raise ValidationException("The repository is not super-awesome")