feat: draft releases, version verification, and reusable workflows#341
Conversation
WalkthroughThe 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. ChangesRelease and CI Pipeline Orchestration
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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-pleaseconfiguration. - Replace the local PR title validation job with a reusable workflow.
- Add a
verify-versiongate 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.
There was a problem hiding this comment.
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
📒 Files selected for processing (3)
.github/workflows/main.yaml.github/workflows/pr-title-check.ymlrelease-please-config.json
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
Description
What problem is being solved?
How is it being solved?
What changes are made to solve it?
References
Review Checklist
mainSummary by CodeRabbit