Skip to content

feat: release automation configs#362

Open
SoulPancake wants to merge 2 commits intomainfrom
feat/release-automation
Open

feat: release automation configs#362
SoulPancake wants to merge 2 commits intomainfrom
feat/release-automation

Conversation

@SoulPancake
Copy link
Copy Markdown
Member

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

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 30, 2026

Warning

Rate limit exceeded

@SoulPancake has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 27 minutes and 1 seconds before requesting another review.

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 27 minutes and 1 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ca4ad8c6-9d84-4762-9482-80e64ccdfa16

📥 Commits

Reviewing files that changed from the base of the PR and between d09bb3d and f0a7f4d.

📒 Files selected for processing (5)
  • .github/workflows/release-please.yml
  • .release-please-manifest.json
  • RELEASE.md
  • constants/index.ts
  • release-please-config.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/release-automation

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.

Comment on lines +30 to +36
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

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}

Copilot Autofix

AI 4 days ago

In general, fix this by adding an explicit permissions: block that grants only the scopes needed for the workflow to operate, either at the workflow root (applies to all jobs) or under the specific job. Because this workflow solely delegates to a reusable workflow that likely performs release operations (tagging, creating GitHub releases, etc.), we should start from a safe minimal set and then allow contents write access so releases and tags can be created while keeping other scopes at their default (none).

The best minimally invasive fix is to add a permissions: block at the top level, just after the on: trigger, to constrain the GITHUB_TOKEN for all jobs in this workflow (there is only one job, release). A conservative configuration for a release workflow is:

permissions:
  contents: write

This assumes the reusable workflow needs to create/update releases or tags (which is standard for release-please). If the project later finds this is too strong, they can refine it further, but this is the smallest reasonable change that addresses the CodeQL warning and maintains expected behavior. Concretely, edit .github/workflows/release-please.yml to insert the permissions: block between the on: section (ending at line 26–27) and the jobs: section (line 28). No additional imports or dependencies are required.

Suggested changeset 1
.github/workflows/release-please.yml

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml
--- a/.github/workflows/release-please.yml
+++ b/.github/workflows/release-please.yml
@@ -25,6 +25,9 @@
         required: false
         type: string
 
+permissions:
+  contents: write
+
 jobs:
   release:
     uses: openfga/sdk-generator/.github/workflows/release-please.yml@main
EOF
@@ -25,6 +25,9 @@
required: false
type: string

permissions:
contents: write

jobs:
release:
uses: openfga/sdk-generator/.github/workflows/release-please.yml@main
Copilot is powered by AI and may make mistakes. Always verify output.
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Mar 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.80%. Comparing base (d09bb3d) to head (f0a7f4d).

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.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@SoulPancake SoulPancake changed the title feat: release automation config feat: release automation configs Apr 2, 2026
@SoulPancake SoulPancake marked this pull request as ready for review April 2, 2026 06:30
@SoulPancake SoulPancake requested a review from a team as a code owner April 2, 2026 06:30
Copilot AI review requested due to automatic review settings April 2, 2026 06:30
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

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 SdkVersion via the x-release-please-version marker, but UserAgent still embeds a hard-coded version string. On the next release, these can drift and produce incorrect user-agent strings/telemetry. Consider deriving UserAgent from SdkVersion (or adding a release-please marker/update pattern for UserAgent as 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.

@@ -0,0 +1,3 @@
{
".": "0.9.3"
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

.release-please-manifest.json is set to 0.9.3, but the repo’s current version appears to be 0.9.4 (e.g., package.json and CHANGELOG.md reference v0.9.4). This mismatch can cause release-please to compute the next version incorrectly or generate a no-op/incorrect release PR. Align the manifest version with the current released version/tag.

Suggested change
".": "0.9.3"
".": "0.9.4"

Copilot uses AI. Check for mistakes.
Comment on lines +3 to +5
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.
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

This guide states releases use a workflow_dispatch-triggered workflow, but .github/workflows/release-please.yml is also configured to run on push to main. Please align the documentation with the actual workflow triggers (or remove the push trigger if manual dispatch is intended).

Copilot uses AI. Check for mistakes.
fix: correct retry logic for transient errors → Fixed
docs: update API reference → Documentation
perf: cache DNS lookups → Changed
refactor: extract auth helper → (hidden)
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

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

The Conventional Commits examples indicate refactor: commits are hidden from the changelog, but release-please-config.json configures refactor with hidden: false (it will be published under “Changed”). Please align the guide with the config (either update this section or set the refactor section to hidden).

Suggested change
refactor: extract auth helper → (hidden)
refactor: extract auth helper → Changed

Copilot uses AI. Check for mistakes.
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