Skip to content

Class peagen.orm.repositories.Repository

peagen.orm.repositories.Repository

Bases: Base, GUIDPk, Timestamped, Ownable, TenantBound, StatusColumn

name class-attribute instance-attribute

name = acol(storage=S(String, nullable=False))

url class-attribute instance-attribute

url = acol(storage=S(String, unique=True, nullable=False))

default_branch class-attribute instance-attribute

default_branch = acol(storage=S(String, default='master'))

commit_sha class-attribute instance-attribute

commit_sha = acol(
    storage=S(String(length=40), nullable=True)
)

github_pat class-attribute instance-attribute

github_pat = vcol(
    field=F(
        py_type=str | None,
        constraints={
            "description": "GitHub PAT (write-only)",
            "exclude": True,
        },
        required_in=("create",),
    ),
    io=IO(
        in_verbs=("create", "update", "replace", "delete")
    ),
)

secrets class-attribute instance-attribute

secrets = relationship(
    "RepoSecret",
    back_populates="repository",
    cascade="all, delete-orphan",
)

deploy_keys class-attribute instance-attribute

deploy_keys = relationship(
    "DeployKey",
    back_populates="repository",
    cascade="all, delete-orphan",
)

tasks class-attribute instance-attribute

tasks = relationship(
    "Task",
    back_populates="repository",
    cascade="all, delete-orphan",
)