Skip to content

chore(ci): correct release-please retargeting, targeting, and java snapshot#605

Merged
SoulPancake merged 1 commit into
mainfrom
chore/release-please-pipeline-fix
Jun 12, 2026
Merged

chore(ci): correct release-please retargeting, targeting, and java snapshot#605
SoulPancake merged 1 commit into
mainfrom
chore/release-please-pipeline-fix

Conversation

@SoulPancake

@SoulPancake SoulPancake commented Jun 12, 2026

Copy link
Copy Markdown
Member

Description

Updated workflow to use clientID instead of deprecated APP ID
And added java snapshot config

What problem is being solved?

How is it being solved?

What changes are made to solve it?

References

Review Checklist

  • I have clicked on "allow edits by maintainers".
  • I have added documentation for new/changed functionality in this PR or in a PR to openfga.dev [Provide a link to any relevant PRs in the references section above]
  • The correct base branch is being used, if not main
  • I have added tests to validate that the change in functionality is working as expected

Summary by CodeRabbit

  • Chores
    • Updated release automation workflows to improve the stability and efficiency of the release process, including enhanced pull request management and discovery mechanisms.
    • Modified release configuration for Java packages to provide better control over snapshot release management and versioning behavior.

Copilot AI review requested due to automatic review settings June 12, 2026 04:30
@SoulPancake SoulPancake requested review from a team as code owners June 12, 2026 04:30
@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 33f3d0e7-6247-4576-9a2b-f09a0f2da190

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

This PR updates the release-please CI/CD system with GitHub App client-id authentication (v3.2.0), migrates PR discovery from search-based to REST API pagination for stale closure and retargeting, adds component-scoped PR closure when targeting single packages, and configures the Java package to skip snapshot releases.

Changes

Release Please Workflow and Configuration Updates

Layer / File(s) Summary
GitHub App token migration to client-id
.github/workflows/reusable-release-please.yaml
Both release-please and post-release jobs are updated to use actions/create-github-app-token v3.2.0 (pinned by SHA) with client-id replacing app-id authentication input.
PR lifecycle management API migration
.github/workflows/reusable-release-please.yaml
Stale PR closure switches from gh pr list --search to paginated REST API with JQ filtering on head refs. Release PR retargeting is redesigned with REST API PR discovery, component-scoped closing of non-matching PRs (when single target-package is specified), and explicit head ref recreation on main via SHA lookup, force-push, PR head patch, old ref deletion, and PR base update.
Java package release configuration
release-please-config.json
Java package configured with skip-snapshot: true to omit snapshot releases.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • openfga/language#594: Introduced the initial release-please workflow and configuration that this PR modifies for token authentication, PR management API migration, and Java package snapshot handling.

Suggested reviewers

  • sergiught
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main changes: updates to the release-please workflow retargeting logic, targeting mechanism with component-scoped behavior, and Java snapshot configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/release-please-pipeline-fix

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the release automation configuration to better handle release-please behavior across multiple packages, including Java snapshot handling and workflow retargeting/targeting logic.

Changes:

  • Configure Java release-please package to skip snapshot PRs (skip-snapshot: true).
  • Update the reusable release-please workflow to use REST API listing (instead of gh pr list --search) to avoid GitHub search indexing lag.
  • Add logic to close non-target package release PRs during a targeted dispatch retargeting flow.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
release-please-config.json Adds Java skip-snapshot configuration for release-please.
.github/workflows/reusable-release-please.yaml Adjusts release-please PR discovery/retargeting logic and updates GitHub App token action inputs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/reusable-release-please.yaml Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/reusable-release-please.yaml:
- Around line 217-226: The current logic that calls gh api PATCH
"repos/${GITHUB_REPOSITORY}/pulls/${pr}" -f head="${new_head}" (inside the block
where new_head != head) attempts to mutate a PR's read-only head and then
deletes the old branch; change this to a supported flow: when you recreate the
branch (after git push origin "${sha}:refs/heads/${new_head}"), do not call
PATCH to set head, instead either (A) create a new PR from ${new_head} and close
the old PR (use gh api to POST a new pull and PATCH the old PR to state=closed),
or (B) keep the old branch until you verify the PR now points to the recreated
ref by checking the PR's head via gh api and only delete the old branch if the
PR head matches; remove the unsupported PATCH call and the unconditional git
push origin --delete "${head}" that can orphan the PR.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 61e2c4c8-bad6-4462-a5da-d5e6b58c163e

📥 Commits

Reviewing files that changed from the base of the PR and between 7fd286c and 9b9b549.

📒 Files selected for processing (2)
  • .github/workflows/reusable-release-please.yaml
  • release-please-config.json

Comment thread .github/workflows/reusable-release-please.yaml
@SoulPancake SoulPancake force-pushed the chore/release-please-pipeline-fix branch from 9b9b549 to a23d018 Compare June 12, 2026 04:34
@SoulPancake SoulPancake force-pushed the chore/release-please-pipeline-fix branch from a23d018 to 28403c4 Compare June 12, 2026 04:57
@SoulPancake SoulPancake added this pull request to the merge queue Jun 12, 2026
Merged via the queue into main with commit 1c669fc Jun 12, 2026
11 checks passed
@SoulPancake SoulPancake deleted the chore/release-please-pipeline-fix branch June 12, 2026 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants