Skip to content

Java snapshot PRs ignore configured snapshot-label (per-package and root) #2779

@LudovicTOURMAN

Description

@LudovicTOURMAN

Summary

snapshot-label declared in release-please-config.json is silently
dropped when release-please opens Java/Maven snapshot pull requests.
The strategy falls back to DEFAULT_SNAPSHOT_LABELS
(['autorelease: snapshot']).

Reproduction

release-please-config.json:

{
  "release-type": "maven",
  "snapshot-label": "team-a",
  "packages": {
    ".": {
      "snapshot-label": "team-a,team-b"
    }
  }
}

Expected: snapshot PRs carry the configured labels.
Observed: snapshot PRs only carry autorelease: snapshot.

Root cause

Two missing wirings in src/manifest.ts:

  1. extractReleaserConfig maps label, release-label, extra-label
    but not snapshot-label. Per-package snapshot-label never reaches
    the strategy options that buildStrategy constructs.
  2. mergeReleaserConfig propagates extraLabels from the root default
    into each per-package config, but not snapshotLabels. So even a
    root-level value never reaches per-package strategies.

Root-level snapshot-label is assigned to Manifest.snapshotLabels,
but that field is only used as a matcher when scanning open PRs to
identify existing snapshot PRs — it is not the source of labels applied
to newly opened snapshot PRs.

Affected versions

Present at least through 17.6.0 (current). The schema and TypeScript
types accept snapshot-label already; only the runtime extraction and
merge were missing.

Fix

PR to follow.

Metadata

Metadata

Assignees

Labels

priority: p3Desirable enhancement or fix. May not be included in next release.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions