googleapis / googleapis/release-please

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

Open
#2,779 1 comment 0 reactions 1 assignee Claimed by @chingor13 View on GitHub
priority: p3
Dominant language
TypeScript
Stars
7.5k
Forks
588
Avg merge
12h 16m
Merged PRs (30d)
7

Description

### 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`:

```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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.