Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
WalkthroughThis PR introduces release-please automation infrastructure by adding a GitHub Actions workflow, configuration files, and version marker comments. It establishes an automated release process with semantic versioning and changelog management for the .NET SDK. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested labels
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 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
Adds release automation scaffolding for the .NET SDK using release-please, including version “anchor” markers in source files and repository-level release configuration/docs.
Changes:
- Add release-please configuration and manifest to drive automated changelog + version bumps.
- Add a reusable GitHub Actions workflow entrypoint for release-please (push + manual dispatch).
- Add a release guide (
RELEASE.md) describing the project’s versioning and release process.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/OpenFga.Sdk/OpenFga.Sdk.csproj | Adds a release-please version marker to the NuGet/package version property. |
| src/OpenFga.Sdk/Constants/FgaConstants.cs | Adds a release-please version marker to the SDK version constant. |
| RELEASE.md | Documents release workflow, versioning rules, and troubleshooting. |
| release-please-config.json | Defines release-please behavior (sections, pre-1.0 bump rules, extra files). |
| .release-please-manifest.json | Seeds/anchors the current released version for release-please. |
| .github/workflows/release-please.yml | Adds the workflow wiring to run release-please via a shared reusable workflow. |
Comments suppressed due to low confidence (1)
src/OpenFga.Sdk/Constants/FgaConstants.cs:27
SdkVersionwill be updated by release-please, butUserAgentembeds the version separately and is not marked for updates. After the next release these can drift (e.g.,SdkVersion=0.10.1butUserAgentstill has0.10.0). Consider derivingUserAgentfromSdkVersion(e.g., non-const) or adding a release-please version marker to theUserAgentline as well so both stay in sync.
public const string SdkVersion = "0.10.0"; // x-release-please-version
/// <summary>
/// User agent used in HTTP requests.
/// </summary>
💡 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)
src/OpenFga.Sdk/Constants/FgaConstants.cs (1)
23-28:⚠️ Potential issue | 🟠 Major
UserAgentversion will drift fromSdkVersionafter releases.The
SdkVersionconstant is correctly marked for release-please updates, butUserAgenton line 28 contains a hardcoded version string"0.10.0"without a release-please marker. After a release,SdkVersionwill be updated to the new version whileUserAgentremains at0.10.0, causing version drift in HTTP headers.Consider either:
- Adding a release-please marker to
UserAgent(may require regex-based replacement in config)- Constructing
UserAgentdynamically usingSdkVersion:Proposed fix to construct UserAgent dynamically
/// <summary> /// User agent used in HTTP requests. /// </summary> - public const string UserAgent = "openfga-sdk dotnet/0.10.0"; + public static readonly string UserAgent = $"openfga-sdk dotnet/{SdkVersion}";🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/OpenFga.Sdk/Constants/FgaConstants.cs` around lines 23 - 28, UserAgent is hardcoded and will drift from SdkVersion after releases; update the code so UserAgent is constructed from the SdkVersion constant instead of embedding the literal "0.10.0" (or alternatively add a release-please marker to the UserAgent string). Locate the symbols SdkVersion and UserAgent in FgaConstants and change UserAgent to be built using SdkVersion (e.g., string concatenation or interpolation with SdkVersion) so the HTTP user-agent always reflects the current SdkVersion.
🧹 Nitpick comments (4)
RELEASE.md (3)
75-82: Add language specifier to fenced code block.This code block is also missing a language specifier.
Proposed fix
-``` +```text feat: add support for batch check → Added fix: correct retry logic for transient errors → Fixed docs: update API reference → Documentation perf: cache DNS lookups → Changed refactor: extract auth helper → (hidden) chore: bump dependencies → (hidden)</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 75 - 82, The fenced code block in RELEASE.md lacks a
language specifier; update the triple-backtick fence that contains the release
notes (the block with lines starting "feat: add support for batch check" through
"chore: bump dependencies") to include a language tag (e.g., addtext) so the block becomestext ... ``` to ensure proper formatting and syntax
highlighting.</details> --- `64-66`: **Add language specifier to fenced code block.** The code block is missing a language specifier. Consider adding `text` or `plaintext` for plain examples. <details> <summary>Proposed fix</summary> ```diff -``` +```text 0.11.0-beta.1 → explicit: 0.11.0-beta.2 → explicit: 0.11.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 showing the version
progression is missing a language specifier; update the triple-backtick block in
RELEASE.md that contains "0.11.0-beta.1 → explicit: 0.11.0-beta.2 →
explicit: 0.11.0" to include a plain-text specifier (for example use ```text or
101-103: Capitalize "GitHub" properly.The official name uses a capital "H".
Proposed fix
**Changelog shows everything ungrouped.** Make sure `changelog-type` in `release-please-config.json` is set to `"default"`, not -`"github"`. +`"GitHub"`.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@RELEASE.md` around lines 101 - 103, Update the mention of the changelog type so "GitHub" is capitalized correctly: in the sentence referencing changelog-type in release-please-config.json, replace the backticked string `"github"` with `"GitHub"` (i.e., change the literal/quoted token shown to use a capital H) so the proper noun appears as "GitHub" while keeping the surrounding text and context (changelog-type, release-please-config.json) unchanged..github/workflows/release-please.yml (1)
39-39: Pin the reusable workflow to a specific commit SHA.The
@mainref makes the workflow mutable and introduces supply chain risk. All other workflows in this repository use pinned commit SHAs (e.g.,@de0fac2e4500dabe0009e67214ff5f5447ce83dd) for reproducibility and security. Update line 39 to use a similar pinned reference to a specific release or commit ofopenfga/sdk-generator.🤖 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, The workflow currently references the reusable workflow using the mutable ref "openfga/sdk-generator/.github/workflows/release-please.yml@main"; replace that mutable ref with a specific commit SHA (the same form used elsewhere, e.g., `@de0fac2e4500dabe0009e67214ff5f5447ce83dd`) to pin the reusable workflow for reproducible, secure runs — update the "uses" value in the line containing uses: openfga/sdk-generator/.github/workflows/release-please.yml@main to the chosen commit SHA.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@release-please-config.json`:
- Around line 14-16: The "refactor" entry in the release-please configuration is
inconsistent with RELEASE.md (line 80): change the "refactor" object in the
release-please-config (the entry with "type": "refactor" and currently "hidden":
false) to use "hidden": true so refactors are omitted from the "Changed"
changelog, ensuring the config matches the documented behavior.
---
Outside diff comments:
In `@src/OpenFga.Sdk/Constants/FgaConstants.cs`:
- Around line 23-28: UserAgent is hardcoded and will drift from SdkVersion after
releases; update the code so UserAgent is constructed from the SdkVersion
constant instead of embedding the literal "0.10.0" (or alternatively add a
release-please marker to the UserAgent string). Locate the symbols SdkVersion
and UserAgent in FgaConstants and change UserAgent to be built using SdkVersion
(e.g., string concatenation or interpolation with SdkVersion) so the HTTP
user-agent always reflects the current SdkVersion.
---
Nitpick comments:
In @.github/workflows/release-please.yml:
- Line 39: The workflow currently references the reusable workflow using the
mutable ref "openfga/sdk-generator/.github/workflows/release-please.yml@main";
replace that mutable ref with a specific commit SHA (the same form used
elsewhere, e.g., `@de0fac2e4500dabe0009e67214ff5f5447ce83dd`) to pin the reusable
workflow for reproducible, secure runs — update the "uses" value in the line
containing uses: openfga/sdk-generator/.github/workflows/release-please.yml@main
to the chosen commit SHA.
In `@RELEASE.md`:
- Around line 75-82: The fenced code block in RELEASE.md lacks a language
specifier; update the triple-backtick fence that contains the release notes (the
block with lines starting "feat: add support for batch check" through "chore:
bump dependencies") to include a language tag (e.g., add ```text) so the block
becomes ```text ... ``` to ensure proper formatting and syntax highlighting.
- Around line 64-66: The fenced code block showing the version progression is
missing a language specifier; update the triple-backtick block in RELEASE.md
that contains "0.11.0-beta.1 → explicit: 0.11.0-beta.2 → explicit: 0.11.0"
to include a plain-text specifier (for example use ```text or ```plaintext) so
the block is rendered correctly as plain content.
- Around line 101-103: Update the mention of the changelog type so "GitHub" is
capitalized correctly: in the sentence referencing changelog-type in
release-please-config.json, replace the backticked string `"github"` with
`"GitHub"` (i.e., change the literal/quoted token shown to use a capital H) so
the proper noun appears as "GitHub" while keeping the surrounding text and
context (changelog-type, release-please-config.json) unchanged.
🪄 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: e05d4434-63d3-4873-9bf2-b59ea74f837d
📒 Files selected for processing (6)
.github/workflows/release-please.yml.release-please-manifest.jsonRELEASE.mdrelease-please-config.jsonsrc/OpenFga.Sdk/Constants/FgaConstants.cssrc/OpenFga.Sdk/OpenFga.Sdk.csproj
Description
What problem is being solved?
How is it being solved?
What changes are made to solve it?
References
Review Checklist
mainSummary by CodeRabbit
Documentation
Chores