chore(ci): release automation configs#362
Conversation
WalkthroughThis PR introduces release automation infrastructure using Google Release Please. It adds a GitHub Actions workflow for automated releases, configuration files to govern the release process, release documentation, updates the version to 0.9.4, and removes the "Unreleased" section from the changelog. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #362 +/- ##
=======================================
Coverage 85.80% 85.80%
=======================================
Files 26 26
Lines 1268 1268
Branches 225 249 +24
=======================================
Hits 1088 1088
Misses 110 110
Partials 70 70 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds release automation and documentation for managing version bumps and changelogs using release-please.
Changes:
- Introduces release-please configuration and manifest for automated versioning/changelog generation.
- Adds a reusable GitHub Actions workflow entrypoint for running release-please.
- Documents the release process and versioning rules in a new
RELEASE.md.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
RELEASE.md |
Adds a release guide describing the intended release workflow and conventions. |
release-please-config.json |
Configures release-please behavior (changelog sections, pre-1.0 bump rules, extra file updates). |
constants/index.ts |
Adds a release-please version marker to keep SdkVersion updated automatically. |
.release-please-manifest.json |
Seeds release-please manifest with the current version. |
.github/workflows/release-please.yml |
Adds a workflow to run the shared release-please reusable workflow. |
Comments suppressed due to low confidence (1)
constants/index.ts:22
- Release-please will update
SdkVersionvia thex-release-please-versionmarker, butUserAgentstill embeds a hard-coded version string. On the next release, these can drift and produce incorrect user-agent strings/telemetry. Consider derivingUserAgentfromSdkVersion(or adding a release-please marker/update pattern forUserAgentas well).
const SdkVersion = "0.9.4"; // x-release-please-version
/**
* User agent used in HTTP requests.
*/
const UserAgent = "openfga-sdk js/0.9.4";
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
constants/index.ts (1)
17-22:⚠️ Potential issue | 🟡 Minor
UserAgentwon't be updated by release-please.The
SdkVersionconstant has thex-release-please-versionmarker, butUserAgenton line 22 contains a hardcoded version string"openfga-sdk js/0.9.4"without a marker. This will cause version drift on future releases.Consider either:
- Adding
// x-release-please-versionmarker to line 22- Constructing
UserAgentdynamically fromSdkVersionOption 2: Construct UserAgent dynamically
-const UserAgent = "openfga-sdk js/0.9.4"; +const UserAgent = `openfga-sdk js/${SdkVersion}`;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@constants/index.ts` around lines 17 - 22, The UserAgent constant is a hardcoded string and will not be updated by release-please; update it so it follows SdkVersion to avoid drift: either add the same release-please marker `// x-release-please-version` to the UserAgent declaration or change UserAgent to be constructed from SdkVersion (e.g., build the "openfga-sdk js/<version>" string using the SdkVersion constant) and remove the hardcoded version literal; update references to UserAgent if necessary.
🧹 Nitpick comments (4)
.github/workflows/release-please.yml (1)
39-39: Consider pinning the reusable workflow to a specific SHA.Using
@mainmeans the workflow could change without notice. For better security and reproducibility, consider pinning to a specific commit SHA or release tag.- uses: openfga/sdk-generator/.github/workflows/release-please.yml@main + uses: openfga/sdk-generator/.github/workflows/release-please.yml@<commit-sha>🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/release-please.yml at line 39, Replace the dynamic reusable workflow ref that currently uses "openfga/sdk-generator/.github/workflows/release-please.yml@main" with a fixed reference to a specific commit SHA or release tag; update the uses entry so it points to a concrete commit SHA (or tag) instead of `@main` to ensure reproducible, auditable workflow execution and improved security.RELEASE.md (3)
75-82: Add language specifier to fenced code block.Same as above—consider adding a language specifier (e.g.,
textorplaintext).🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@RELEASE.md` around lines 75 - 82, The fenced code block in RELEASE.md lacks a language specifier; update the block delimiters around the changelog lines (the triple backticks shown in the diff) to include a language hint such as "text" or "plaintext" (e.g., ```text) so syntax highlighters/renderers treat the block as plain text.
64-66: Add language specifier to fenced code block.For markdown consistency and syntax highlighting, specify a language for the code block.
Suggested fix
-``` +```text 0.10.0-beta.1 → explicit: 0.10.0-beta.2 → explicit: 0.10.0</details> <details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against the current code and only fix it if needed.
In
@RELEASE.mdaround lines 64 - 66, The fenced code block containing the
version line "0.10.0-beta.1 → explicit: 0.10.0-beta.2 → explicit: 0.10.0" is
missing a language specifier; update the triple-backtick fence to include a
language (for example use ```text) so the block becomes a labeled fenced code
block for consistent markdown rendering and syntax highlighting.</details> --- `101-103`: **Capitalize "GitHub" properly.** The brand name should be capitalized as "GitHub". <details> <summary>Suggested fix</summary> ```diff -`"github"`. +`"github"` (GitHub's changelog format). ``` Or simply: ```diff Make sure `changelog-type` in `release-please-config.json` is set to `"default"`, not -`"github"`. +the `"github"` type. ``` </details> <details> <summary>🤖 Prompt for AI Agents</summary> ``` Verify each finding against the current code and only fix it if needed. In `@RELEASE.md` around lines 101 - 103, Update the README text to capitalize the brand name "GitHub" properly while leaving config literals unchanged: in the sentence mentioning changelog-type and release-please-config.json, keep the code literal `changelog-type` and the value strings `"default"` and `"github"` as-is (since they are config values) but change any plain-text occurrences of the provider name to "GitHub" (e.g., replace uncapitalized "github" used as the product name with "GitHub") so the message reads clearly and uses the correct brand capitalization. ``` </details> </blockquote></details> </blockquote></details> <details> <summary>🤖 Prompt for all review comments with AI agents</summary>Verify each finding against the current code and only fix it if needed.
Inline comments:
In@release-please-config.json:
- Around line 14-15: The config and docs disagree about refactor visibility:
change either the release-please-config.json entry for the "refactor" type (set
"hidden": true) or update RELEASE.md to remove the "(hidden)" note for refactor;
in other words, locate the JSON object with "type": "refactor" and flip
"hidden": false to "hidden": true if you want refactors omitted from changelogs,
or edit the RELEASE.md section describing "refactor" to reflect that it is
visible (remove the “(hidden)” text) so both sources match.
Outside diff comments:
In@constants/index.ts:
- Around line 17-22: The UserAgent constant is a hardcoded string and will not
be updated by release-please; update it so it follows SdkVersion to avoid drift:
either add the same release-please marker// x-release-please-versionto the
UserAgent declaration or change UserAgent to be constructed from SdkVersion
(e.g., build the "openfga-sdk js/" string using the SdkVersion
constant) and remove the hardcoded version literal; update references to
UserAgent if necessary.
Nitpick comments:
In @.github/workflows/release-please.yml:
- Line 39: Replace the dynamic reusable workflow ref that currently uses
"openfga/sdk-generator/.github/workflows/release-please.yml@main" with a fixed
reference to a specific commit SHA or release tag; update the uses entry so it
points to a concrete commit SHA (or tag) instead of@mainto ensure
reproducible, auditable workflow execution and improved security.In
@RELEASE.md:
- Around line 75-82: The fenced code block in RELEASE.md lacks a language
specifier; update the block delimiters around the changelog lines (the triple
backticks shown in the diff) to include a language hint such as "text" or
"plaintext" (e.g., ```text) so syntax highlighters/renderers treat the block as
plain text.- Around line 64-66: The fenced code block containing the version line
"0.10.0-beta.1 → explicit: 0.10.0-beta.2 → explicit: 0.10.0" is missing a
language specifier; update the triple-backtick fence to include a language (for
example use ```text) so the block becomes a labeled fenced code block for
consistent markdown rendering and syntax highlighting.- Around line 101-103: Update the README text to capitalize the brand name
"GitHub" properly while leaving config literals unchanged: in the sentence
mentioning changelog-type and release-please-config.json, keep the code literal
changelog-typeand the value strings"default"and"github"as-is (since
they are config values) but change any plain-text occurrences of the provider
name to "GitHub" (e.g., replace uncapitalized "github" used as the product name
with "GitHub") so the message reads clearly and uses the correct brand
capitalization.</details> <details> <summary>🪄 Autofix (Beta)</summary> Fix all unresolved CodeRabbit comments on this PR: - [ ] <!-- {"checkboxId": "4b0d0e0a-96d7-4f10-b296-3a18ea78f0b9"} --> Push a commit to this branch (recommended) - [ ] <!-- {"checkboxId": "ff5b1114-7d8c-49e6-8ac1-43f82af23a33"} --> Create a new PR with the fixes </details> --- <details> <summary>ℹ️ Review info</summary> <details> <summary>⚙️ Run configuration</summary> **Configuration used**: Organization UI **Review profile**: CHILL **Plan**: Pro **Run ID**: `15093379-9788-4092-afa0-bedfd66359d6` </details> <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between d09bb3d400d892db903d03ad7efc326c45cc9e9d and 68efb8f3a672ecace6c62f49b01d011ee6dc181f. </details> <details> <summary>📒 Files selected for processing (7)</summary> * `.github/workflows/release-please.yml` * `.release-please-manifest.json` * `CHANGELOG.md` * `RELEASE.md` * `constants/index.ts` * `example/streamed-list-objects/package.json` * `release-please-config.json` </details> <details> <summary>💤 Files with no reviewable changes (1)</summary> * CHANGELOG.md </details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
Description
What problem is being solved?
How is it being solved?
What changes are made to solve it?
References
Review Checklist
mainSummary by CodeRabbit
Chores
Documentation