cicd.core.provider.models
cicd.core.provider.models.api
- class cicd.core.provider.models.api.API
Bases:
ProviderModel- get_project(identifier: int | str, **kwargs)
- get_projects(**kwargs)
- model_config: ClassVar[ConfigDict] = {'keep_untouched': (<class 'functools.cached_property'>,)}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
cicd.core.provider.models.base
- class cicd.core.provider.models.base.ProviderModel
Bases:
BaseModel,ProviderMixin- property client: ProviderClient
- model_config: ClassVar[ConfigDict] = {'keep_untouched': (<class 'functools.cached_property'>,)}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- property schema
- cicd.core.provider.models.base.model(dtype: Type[D], to_list: Literal[True]) Callable[[Callable[[P], Any]], Callable[[P], List[D]]]
- cicd.core.provider.models.base.model(dtype: Type[D], to_list: Literal[False] = False) Callable[[Callable[[P], Any]], Callable[[P], D]]
A decorator to convert json data to model/list of models.
class Model: @model(Project, to_list=True) def get_projects(self): ... @model(Project) def get_project(self): ...
cicd.core.provider.models.pr
- class cicd.core.provider.models.pr.PullRequest(*, id: int, title: str | None)
Bases:
ProviderModel- id: int
- model_config: ClassVar[ConfigDict] = {'keep_untouched': (<class 'functools.cached_property'>,)}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- title: str | None
cicd.core.provider.models.project
- class cicd.core.provider.models.project.Project(*, id: int | None, name: str | None, description: str | None, full_name: str | None)
Bases:
ProviderModel- description: str | None
- full_name: str | None
- get_pull_request(identifier, **kwargs)
- get_pull_requests(state: str | None = None, **kwargs)
- id: int | None
- property identifier: int | str
- model_config: ClassVar[ConfigDict] = {'keep_untouched': (<class 'functools.cached_property'>,)}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- name: str | None
- property url: str