Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 26 minutes and 8 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
✨ 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 |
| uses: openfga/sdk-generator/.github/workflows/release-please.yml@main | ||
| with: | ||
| bump-type: ${{ inputs.bump-type || 'auto' }} | ||
| release-version: ${{ inputs.release-version || '' }} | ||
| secrets: | ||
| APP_ID: ${{ secrets.APP_ID }} | ||
| APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }} |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 4 days ago
In general, to fix this issue you should explicitly declare a permissions block in the workflow (either at the root or per-job) that grants only the minimal scopes required for the job. This prevents the workflow from inheriting broader default GITHUB_TOKEN permissions from the repository or organization.
For this specific file, the safest and most compatible approach—without changing existing functionality—is to add a root-level permissions block that grants read-only access to repository contents, which is a common minimal baseline and aligns with the suggested “minimal starting point” in the warning. Because this workflow simply delegates to a reusable workflow via uses: openfga/sdk-generator/.github/workflows/release-please.yml@main and we cannot see its internals, we should not try to guess additional write scopes; if that reusable workflow needs more, it can (and should) request them itself. The change should be added near the top of .github/workflows/release-please.yml, for example immediately after the name: release-please line, so that it applies to all jobs defined in this workflow (including the release job).
No additional imports or methods are needed; only YAML configuration changes are required.
| @@ -1,5 +1,8 @@ | ||
| name: release-please | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| @@ -30,7 +33,7 @@ | ||
| uses: openfga/sdk-generator/.github/workflows/release-please.yml@main | ||
| with: | ||
| bump-type: ${{ inputs.bump-type || 'auto' }} | ||
| release-version: ${{ inputs.release-version || '' }} | ||
| release-version: ${{ inputs-release-version || '' }} | ||
| secrets: | ||
| APP_ID: ${{ secrets.APP_ID }} | ||
| APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }} |
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project status has failed because the head coverage (38.04%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #312 +/- ##
============================================
- Coverage 38.05% 38.04% -0.02%
+ Complexity 1259 1258 -1
============================================
Files 198 198
Lines 7646 7646
Branches 885 885
============================================
- Hits 2910 2909 -1
Misses 4598 4598
- Partials 138 139 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR introduces release-please configuration and documentation to automate version bumps, changelog generation, and release PR creation for the OpenFGA Java SDK.
Changes:
- Add release-please manifest/config and a reusable GitHub Actions workflow for releases.
- Annotate version declarations to be discoverable by release-please.
- Document the intended release process and versioning rules in a new release guide.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
src/main/java/dev/openfga/sdk/constants/FgaConstants.java |
Adds a release-please version marker to the SDK version constant. |
build.gradle |
Adds a release-please version marker to the Gradle project version. |
release-please-config.json |
Adds release-please configuration (changelog sections, extra-files, pre-1.0 bump behavior). |
.release-please-manifest.json |
Adds the initial release-please manifest version. |
.github/workflows/release-please.yml |
Adds the release-please workflow (push + manual dispatch) using a reusable workflow. |
RELEASE.md |
Adds documentation describing how to cut releases and troubleshoot release-please. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| /** Version of the OpenFGA Java SDK. */ | ||
| public static final String SDK_VERSION = "0.9.7"; | ||
| public static final String SDK_VERSION = "0.9.7"; // x-release-please-version |
There was a problem hiding this comment.
FgaConstants.java is marked as auto-generated (and is listed in .openapi-generator/FILES). Editing generated sources directly is likely to be overwritten on the next regeneration; the x-release-please-version marker should be added in the generator templates (sdk-generator repo) or moved to a non-generated source so it remains stable across regenerations.
| public static final String SDK_VERSION = "0.9.7"; // x-release-please-version | |
| public static final String SDK_VERSION = "0.9.7"; |
| bump-type: ${{ inputs.bump-type || 'auto' }} | ||
| release-version: ${{ inputs.release-version || '' }} |
There was a problem hiding this comment.
This workflow runs on both push and workflow_dispatch, but it references the inputs.* context in the reusable-workflow with: block. On non-workflow_dispatch events (e.g. push), inputs can be undefined and cause the workflow to fail to evaluate. Consider switching to github.event.inputs.* with defaults, or conditionally setting with: values based on github.event_name (e.g. hardcode bump-type: auto on push).
| bump-type: ${{ inputs.bump-type || 'auto' }} | |
| release-version: ${{ inputs.release-version || '' }} | |
| bump-type: ${{ github.event_name == 'workflow_dispatch' && (github.event.inputs.bump-type || 'auto') || 'auto' }} | |
| release-version: ${{ github.event_name == 'workflow_dispatch' && (github.event.inputs.release-version || '') || '' }} |
|
|
||
| jobs: | ||
| release: | ||
| uses: openfga/sdk-generator/.github/workflows/release-please.yml@main |
There was a problem hiding this comment.
The reusable workflow is referenced with @main. To reduce supply-chain risk and ensure reproducible releases, pin this to a specific commit SHA or a version tag of openfga/sdk-generator instead of a moving branch.
| uses: openfga/sdk-generator/.github/workflows/release-please.yml@main | |
| uses: openfga/sdk-generator/.github/workflows/release-please.yml@v0.4.0 |
| ], | ||
| "extra-files": [ | ||
| { "type": "generic", "path": "build.gradle" }, | ||
| { "type": "generic", "path": "src/main/java/dev/openfga/sdk/constants/FgaConstants.java" } |
There was a problem hiding this comment.
extra-files only lists build.gradle and FgaConstants.java, but this repo hard-codes the current version in other files (e.g. publish.gradle and multiple README.md dependency snippets). With the current config, release-please will bump only a subset, leaving inconsistent versions and potentially incorrect published metadata. Either add the other versioned files to extra-files or refactor them to derive from a single source of truth (e.g. project.version).
| { "type": "generic", "path": "src/main/java/dev/openfga/sdk/constants/FgaConstants.java" } | |
| { "type": "generic", "path": "src/main/java/dev/openfga/sdk/constants/FgaConstants.java" }, | |
| { "type": "generic", "path": "publish.gradle" }, | |
| { "type": "generic", "path": "README.md" } |
| This project uses [release-please](https://github.com/googleapis/release-please) via a | ||
| `workflow_dispatch`-triggered GitHub Actions workflow. This document explains how to cut | ||
| a release and what to watch out for. |
There was a problem hiding this comment.
The guide says releases use a workflow_dispatch-triggered workflow, but .github/workflows/release-please.yml also runs on push to main. Either update this documentation to describe the push behavior, or remove the push trigger if the intent is manual-only releases.
| 4. The GitHub Release and tag are created automatically on merge. | ||
|
|
There was a problem hiding this comment.
This section claims “The GitHub Release and tag are created automatically on merge,” but the existing pipeline creates releases via .github/workflows/main.yaml and currently marks them as draft: true. Please clarify whether the release should be drafted vs published automatically, and which workflow is the source of truth to avoid duplicate/conflicting release creation.
| 4. The GitHub Release and tag are created automatically on merge. | |
| 4. On merge, `.github/workflows/main.yaml` automatically creates a **draft** GitHub Release and tag. This workflow is the single source of truth for creating GitHub Releases and tags; do not enable release creation in the release-please workflow to avoid duplicates. | |
| 5. When you are ready to publish, go to **Releases**, review the draft release created by `.github/workflows/main.yaml`, and click **Publish release**. |
Description
What problem is being solved?
How is it being solved?
What changes are made to solve it?
References
Review Checklist
main