Skip to content

Comments

fix: pass header and footer through in Java snapshot PRs#2685

Open
zeitlinger wants to merge 1 commit intogoogleapis:mainfrom
zeitlinger:fix/java-snapshot-pr-footer
Open

fix: pass header and footer through in Java snapshot PRs#2685
zeitlinger wants to merge 1 commit intogoogleapis:mainfrom
zeitlinger:fix/java-snapshot-pr-footer

Conversation

@zeitlinger
Copy link

Summary

The buildSnapshotPullRequest() method in the Java strategy constructs
a PullRequestBody without passing the configured pullRequestHeader
and pullRequestFooter, causing these options to be silently ignored
for Java snapshot PRs.

This is especially visible for single-package repos where
separatePullRequests defaults to true and the Merge plugin
(which would otherwise apply the footer) does not run.

Changes

  • Pass this.pullRequestHeader and this.pullRequestFooter to
    PullRequestBody in java.ts:buildSnapshotPullRequest()
  • Remove the existing TODO comment that was asking about this
  • Add a test verifying header and footer appear in snapshot PRs

Context

Discovered while configuring pull-request-footer on
prometheus/client_java
— a single-package Java repo where the footer was silently ignored
on the SNAPSHOT PR.

The `buildSnapshotPullRequest()` method in the Java strategy was
constructing a `PullRequestBody` without passing the configured
`pullRequestHeader` and `pullRequestFooter`, causing these options
to be silently ignored for Java snapshot PRs.

This is especially visible for single-package repos where
`separatePullRequests` defaults to `true` and the Merge plugin
(which would otherwise apply the footer) does not run.

Fixes the TODO comment that was already in the code asking about this.
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
@zeitlinger zeitlinger requested review from a team as code owners February 20, 2026 17:02
@product-auto-label product-auto-label bot added the size: s Pull request size is small. label Feb 20, 2026
@google-cla
Copy link

google-cla bot commented Feb 20, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

zeitlinger added a commit to grafana/flint that referenced this pull request Feb 20, 2026
…around (#42)

## Summary
- Remove `separate-pull-requests: false` added in #40
- That workaround is only needed for Java snapshot PRs (upstream bug:
  googleapis/release-please#2685)
- Flint uses `release-type: simple`, so the footer works without it

Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: s Pull request size is small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants