Skip to content

feat: draft releases, version verification, and reusable workflows#341

Merged
SoulPancake merged 2 commits into
mainfrom
feat/release-workflow-improvements
May 11, 2026
Merged

feat: draft releases, version verification, and reusable workflows#341
SoulPancake merged 2 commits into
mainfrom
feat/release-workflow-improvements

Conversation

@SoulPancake
Copy link
Copy Markdown
Member

@SoulPancake SoulPancake commented May 4, 2026

Description

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
    • Enhanced release pipeline with automated version verification across tag, manifest, and build configurations.
    • Streamlined PR validation by adopting reusable workflow automation.
    • Enabled draft release mode for improved release management workflow.

Review Change Stack

Copilot AI review requested due to automatic review settings May 4, 2026 17:22
@SoulPancake SoulPancake requested a review from a team as a code owner May 4, 2026 17:22
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 4, 2026

Walkthrough

The PR refactors the Java SDK's release pipeline to enable draft mode for releases, verify version consistency across multiple artifacts before publishing, delegate PR title validation to a shared workflow, and replace inline release creation with a reusable undraft workflow invocation.

Changes

Release and CI Pipeline Orchestration

Layer / File(s) Summary
Release Configuration
release-please-config.json
Adds "draft": true to enable draft release PRs.
PR Title Validation
.github/workflows/pr-title-check.yml
Delegates PR title validation to openfga/sdk-generator/.github/workflows/pr-title-check.yml@main reusable workflow instead of inline conventional-commits checking.
Version Verification on Tags
.github/workflows/main.yaml
New verify-version job validates that tag version, .release-please-manifest.json version, build.gradle version, and publish.gradle version all match; runs only on tag pushes.
Publish Job Dependencies
.github/workflows/main.yaml
publish-maven-central and publish-github-packages now depend on verify-version instead of test, blocking publication if version checks fail.
Release Finalization
.github/workflows/main.yaml
Replaces create-release job with undraft-release that calls a reusable workflow and executes after both publishing jobs complete, with contents: write permission retained.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • openfga/java-sdk#179: Also modifies the release/publish workflow and create-release behavior.
  • openfga/java-sdk#312: Relates to release-please manifest and Gradle version artifacts that are now validated by the new verify-version job.

Suggested reviewers

  • rhamzeh
  • jimmyjames
🚥 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 summarizes the main changes: enabling draft releases in release-please-config.json, adding version verification via verify-version job, and refactoring workflows to use reusable workflows from openfga/sdk-generator.
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 feat/release-workflow-improvements

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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the repository’s release automation and CI workflows to centralize common logic in reusable workflows, create draft releases, and add a tag-to-repo version consistency check prior to publishing artifacts.

Changes:

  • Enable draft releases in release-please configuration.
  • Replace the local PR title validation job with a reusable workflow.
  • Add a verify-version gate for tag builds and replace the local release-creation job with an “undraft release” reusable workflow.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
release-please-config.json Enables draft behavior for release-please-generated releases.
.github/workflows/pr-title-check.yml Switches PR title validation to a shared reusable workflow.
.github/workflows/main.yaml Adds a version verification job before publishing and delegates “undraft release” to a reusable workflow.

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

Comment thread .github/workflows/pr-title-check.yml
Comment thread .github/workflows/main.yaml
Comment thread .github/workflows/main.yaml
@SoulPancake SoulPancake enabled auto-merge May 5, 2026 13:04
@SoulPancake SoulPancake added enhancement New feature or request and removed enhancement New feature or request labels May 11, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 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/main.yaml:
- Line 157: The workflow is referencing a mutable ref
"openfga/sdk-generator/.github/workflows/undraft-release.yml@main"; replace the
branch ref with a specific commit SHA (e.g., change the uses value to
"openfga/sdk-generator/.github/workflows/undraft-release.yml@<commit-sha>") and
add an inline comment noting the pinned version/date; ensure the pinned SHA
corresponds to a reviewed commit and plan to update it periodically (Dependabot
or manual) when you need to move to a newer reviewed version.
- Around line 62-63: The grep patterns that set GRADLE_VERSION and
PUBLISH_VERSION are fragile and may yield empty values; update the extraction
logic that sets GRADLE_VERSION and PUBLISH_VERSION to accept both single and
double quotes (or more robustly parse the line), then validate each variable
after extraction and fail the workflow with a clear error if either is empty or
identical to a placeholder; specifically modify the commands that produce
GRADLE_VERSION and PUBLISH_VERSION (the grep -oP "'\K[^']+" invocations) and add
a check immediately after to echo a helpful error and exit non‑zero if the
extracted values are empty or invalid.

In @.github/workflows/pr-title-check.yml:
- Line 13: Replace the floating reference "uses:
openfga/sdk-generator/.github/workflows/pr-title-check.yml@main" with a pinned
commit SHA; locate the uses entry in .github/workflows/pr-title-check.yml and
change the `@main` suffix to the specific commit SHA (e.g., @<commit-sha>) of the
openfga/sdk-generator repo so the reusable workflow is locked to a reviewed
revision.
🪄 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: 1fbf8144-dcfe-40fb-a991-b4ef9ba86f8b

📥 Commits

Reviewing files that changed from the base of the PR and between a456d9d and eb47215.

📒 Files selected for processing (3)
  • .github/workflows/main.yaml
  • .github/workflows/pr-title-check.yml
  • release-please-config.json

Comment thread .github/workflows/main.yaml
Comment thread .github/workflows/main.yaml
Comment thread .github/workflows/pr-title-check.yml
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 38.47%. Comparing base (a456d9d) to head (eb47215).

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #341      +/-   ##
============================================
- Coverage     38.48%   38.47%   -0.02%     
+ Complexity     1268     1267       -1     
============================================
  Files           198      198              
  Lines          7704     7704              
  Branches        900      900              
============================================
- Hits           2965     2964       -1     
  Misses         4591     4591              
- Partials        148      149       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@SoulPancake SoulPancake added this pull request to the merge queue May 11, 2026
Merged via the queue into main with commit 8c36b13 May 11, 2026
29 checks passed
@SoulPancake SoulPancake deleted the feat/release-workflow-improvements branch May 11, 2026 15:59
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.

4 participants