Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions python/cz_commitizen/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
# Copyright 2025 © BeeAI a Series of LF Projects, LLC
# SPDX-License-Identifier: Apache-2.0

from cz_commitizen.monorepo_commits import MonorepoCommitsCz

__all__ = ["MonorepoCommitsCz"]
11 changes: 8 additions & 3 deletions python/cz_commitizen/monorepo_commits.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
# Copyright 2025 © BeeAI a Series of LF Projects, LLC
# SPDX-License-Identifier: Apache-2.0

from __future__ import annotations

from collections.abc import Iterable
from typing import Any
from typing import TYPE_CHECKING, Any

from commitizen import git
from commitizen.cz.conventional_commits import ConventionalCommitsCz # type: ignore

__all__ = ["MonorepoCommitsCz"]

from commitizen.question import CzQuestion
if TYPE_CHECKING:
from commitizen import git
from commitizen.question import CzQuestion


class MonorepoCommitsCz(ConventionalCommitsCz):
Expand All @@ -24,6 +27,8 @@ class MonorepoCommitsCz(ConventionalCommitsCz):
def changelog_message_builder_hook(
self, parsed_message: dict[str, Any], commit: git.GitCommit
) -> dict[str, Any] | Iterable[dict[str, Any]] | None:
from commitizen import git

changed_files = git.get_filenames_in_commit(commit.rev) or []

has_python_changes = any(file.startswith("python/") for file in changed_files)
Expand Down
8 changes: 7 additions & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ homepage = "https://framework.beeai.dev/"
repository = "https://github.com/i-am-bee/beeai-framework"
documentation = "https://i-am-bee.github.io/beeai-framework/#/python/"

[tool.poetry]
packages = [
{ include = "beeai_framework" },
{ include = "cz_commitizen" },
]
Comment thread
pragnyanramtha marked this conversation as resolved.

[tool.poetry.dependencies]
python = ">= 3.11,<3.14"
a2a-sdk = {version = "^0.3.9", optional = true, extras = ["grpc", "http-server", "telemetry"]}
Expand Down Expand Up @@ -192,7 +198,7 @@ requires = ["poetry-core>=2.0.0,<3.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.poetry.plugins."commitizen.plugin"]
cz_monorepo_commits = "cz_commitizen:MonorepoCommitsCz"
cz_monorepo_commits = "cz_commitizen.monorepo_commits:MonorepoCommitsCz"

[tool.ruff]
lint.select = [
Expand Down
2 changes: 1 addition & 1 deletion python/tasks.toml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ outputs = { auto = true }
depends = ["python:setup"]
dir = "{{config_root}}/python"
run = "rm -rf build dist 2>/dev/null; poetry build"
sources = ["beeai_framework/**/*.py"]
sources = ["beeai_framework/**/*.py", "cz_commitizen/**/*.py"]
outputs = { auto = true }

# test
Expand Down
Loading