-
Notifications
You must be signed in to change notification settings - Fork 264
Closed
Labels
Description
Question
In a monorepo with structure like:
./
- src/: shared code
- projects
- api/
- pyproject.toml
- src/
- <other packages>
- ...
I’d like any change in src/ to be reflected as a change of the package in projects/api by setting path_filters like:
[tool.semantic_release.commit_parser_options]
path_filters = [".", "../../src"]
But modifications in src/ don’t get added to the generated changelog:
touch src/test.txt
git add .
git commit -m "fix: test"
cd projects/api
semantic-release -v --noop version
Should I not rely on path filters to include such changes in code shared by multiple packages ?
Configuration
Semantic Release Configuration
[tool.semantic_release]
commit_parser = "conventional-monorepo"
commit_message = """\
chore(release): api@{version}`
Automatically generated by python-semantic-release
"""
tag_format = "api-v{version}"
version_toml = ["pyproject.toml:project.version"]
build_command = """
uv lock --upgrade-package "$PACKAGE_NAME"
git add ../../uv.lock
"""
[tool.semantic_release.commit_parser_options]
path_filters = [".", "../../src"]
scope_prefix = "api-"
[tool.semantic_release.changelog]
# Recommended patterns for conventional commits parser that is scope aware
exclude_commit_patterns = [
'''^chore(?:\([^)]*?\))?: .+''',
'''^ci(?:\([^)]*?\))?: .+''',
'''^refactor(?:\([^)]*?\))?: .+''',
'''^style(?:\([^)]*?\))?: .+''',
'''^test(?:\([^)]*?\))?: .+''',
'''^build\((?!deps\): .+)''',
'''^Initial [Cc]ommit.*''',
]
mode = "update"
insertion_flag = "<!-- python-semantic-release insertion_flag -->"
[tool.semantic_release.changelog.default_templates]
changelog_file = "../../docs/api/changelog.md"
output_format = "md"
Additional context
git log --oneline --decorate --graph --all -n 50