Skip to content

types

Branches

Bases: str, Enum

Default branches to use for the supported workflows.

Source code in m/ci/types.py
class Branches(str, Enum):  # noqa: WPS600
    """Default branches to use for the supported workflows."""

    master = 'master'
    develop = 'develop'
    release = 'release'
    hotfix = 'hotfix'

    def __str__(self: 'Branches') -> str:
        """Return the string representation of the Branch.

        Returns:
            The string representation of the Branch.
        """
        return self.value

__str__()

Return the string representation of the Branch.

Returns:

Type Description
str

The string representation of the Branch.

Source code in m/ci/types.py
def __str__(self: 'Branches') -> str:
    """Return the string representation of the Branch.

    Returns:
        The string representation of the Branch.
    """
    return self.value

GitFlowConfig

Bases: BaseModel

An object mapping branches for the git_flow workflow.

Attributes:

Name Type Description
master_branch str | Branches

...

develop_branch str | Branches

...

release_prefix str | Branches

...

hotfix_prefix str | Branches

...

Source code in m/ci/types.py
class GitFlowConfig(BaseModel):
    """An object mapping branches for the git_flow workflow."""

    master_branch: str | Branches = Branches.master
    develop_branch: str | Branches = Branches.develop
    release_prefix: str | Branches = Branches.release
    hotfix_prefix: str | Branches = Branches.hotfix

MFlowConfig

Bases: BaseModel

An object mapping branches for the m_flow workflow.

Attributes:

Name Type Description
master_branch str | Branches

...

release_prefix str | Branches

...

hotfix_prefix str | Branches

...

Source code in m/ci/types.py
class MFlowConfig(BaseModel):
    """An object mapping branches for the m_flow workflow."""

    master_branch: str | Branches = Branches.master
    release_prefix: str | Branches = Branches.release
    hotfix_prefix: str | Branches = Branches.hotfix

Workflow

Bases: str, Enum

Supported workflows.

Source code in m/ci/types.py
class Workflow(str, Enum):  # noqa: WPS600
    """Supported workflows."""

    git_flow = 'git_flow'
    m_flow = 'm_flow'
    free_flow = 'free_flow'

    def __str__(self: 'Workflow') -> str:
        """Return the string representation of the workflow.

        Returns:
            The string representation of the workflow.
        """
        return self.value

__str__()

Return the string representation of the workflow.

Returns:

Type Description
str

The string representation of the workflow.

Source code in m/ci/types.py
def __str__(self: 'Workflow') -> str:
    """Return the string representation of the workflow.

    Returns:
        The string representation of the workflow.
    """
    return self.value