Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Improve support for monorepo using Conventional Commits scope #1215

Closed as not planned
Labels
@asaf

Description

@asaf

Feature Request

Description

Currently,Python Semantic Release does not support filtering commits byscopes ((pkg1),(pkg2)) in monorepos. This means that whenmultiple packages exist in a single repository, version bumps may happen incorrectly.

For example, given a monorepo with two packages:/packages/pkg1,/packages/pkg2

If a commit like:

feat(pkg1): Added new API feature

appears,pkg2 should not get a version bump, but currently,semantic-release does not support filtering commits by scope.

Use cases

  1. Monorepos with independent package versioning

    • Developers working on multiple packages in a single repository often wanteach package to be released separately.
    • Example: A commitfeat(pkg1): Added logging should bumppkg1's version, butpkg2's version should remain unchanged.
  2. Scoped commit filtering for better release control

    • Some teams use commit scopes (feat(pkg1): ...,fix(pkg2): ...) tospecifically indicate which package was modified.
    • Currently,semantic-releasereads all commits, making it difficult to version packages separately in monorepos.

Possible implementation

  1. Introduce acommit_scope_filter option inpyproject.toml
[semantic_release.commit_parser_options]minor_tags = ["feat"]commit_scope_filter ="pkg1"
  • If set,semantic-releaseonly considers commits with the matching scope.
  • If not set,semantic-release behaves as it does today (reading all commits).
  1. Modify commit parsing to respect the scope filter
  • When calculating the next version,ignore commits that do not match the specifiedcommit_scope_filter.
  1. Extendsemantic-release changelog to support scope filtering
semantic-release changelog --scope=pkg1

Alternative solutions

  • Usingseparate repositories for each package (not ideal for monorepos).
  • Manually filtering commits before runningsemantic-release per package.
  • Runningsemantic-release in isolated environments per package and limitinggit log manually.

This feature would greatly improvemonorepo support insemantic-release by ensuring thatonly relevant commits impact versioning for each package.

Best,
Asaf

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp