Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[bug] Monorepo path_filters fails to reference paths outside the current package subtree #1380

Copy link
Copy link
@guillaumecherel

Description

@guillaumecherel
Issue body actions

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working properlySomething isn't working properlyreleased

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.