Skip to content

exclude-paths filters out empty Release-As commits in manifest mode #2891

Description

@jharvey10

Environment details

  • OS: macOS 26.6 (local investigation); observed in a GitHub Actions ubuntu-latest run
  • Node.js version: v26.5.0
  • npm version: 11.17.0
  • release-please version: 17.11.2 (current main checkout); Grafana Alloy’s runner depends on release-please: ^17.11.1

Steps to reproduce

  1. Configure manifest mode with an excluded path:

    {
      "packages": {
        ".": {
          "release-type": "node",
          "exclude-paths": ["syntax"]
        }
      }
    }
  2. Merge an empty commit containing a Release-As footer:

    git commit --allow-empty \
      -m "chore: force a release" \
      -m "Release-As: 1.0.1"
  3. Run Release Please in manifest mode.

Expected behavior

Release Please creates a release PR for the root package at 1.0.1.

Empty commits are intentionally included in manifest-mode processing to support the documented Release-As workflow. An empty commit has no changed files, so it cannot be determined to contain changes exclusively under an excluded path.

Actual behavior

No release PR is created for the package configured with exclude-paths.

CommitExclude.shouldInclude() filters the empty commit’s files: [] array and then calls every(). Since [].every(...) is true, the predicate concludes that all files are excluded and removes the commit before versioning and changelog generation. The Release-As footer is parsed, but never reaches the release strategy.

Observed downstream

Grafana Alloy’s root package config excludes syntax. On its release/v1.19 branch, PR grafana/alloy#6991 merged an empty commit whose PR-body override includes:

BEGIN_COMMIT_OVERRIDE
fix: Align latest patch release with correct git tag (#6991)

Release-As: v1.19.2
END_COMMIT_OVERRIDE

The subsequent Release Please run did not create the expected root release PR. That workflow uses --root-only, so the root package is the relevant release target.

Related issues

A narrow fix would retain commits when files is absent or empty, while continuing to exclude commits whose changed files are all under configured excluded paths.

Prospective fix located here

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: p3Desirable enhancement or fix. May not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions