Skip to content

ci: add release-please-develop pre-release workflow - #303

Open
SoulPancake wants to merge 1 commit into
mainfrom
feat/release-please-develop
Open

ci: add release-please-develop pre-release workflow#303
SoulPancake wants to merge 1 commit into
mainfrom
feat/release-please-develop

Conversation

@SoulPancake

@SoulPancake SoulPancake commented Jul 28, 2026

Copy link
Copy Markdown
Member

Adds a release-please-develop workflow enabling pre-release (alpha/beta/rc) releases from the develop branch, via workflow_dispatch or on merge of a release: PR. It is a thin caller around the shared openfga/.github reusable release-please-prerelease.yml, mirroring the existing release-please main flow.

Reference: https://github.com/openfga/js-sdk/blob/main/.github/workflows/release-please-develop.yml

Summary by CodeRabbit

  • Chores
    • Added automated prerelease release management for the develop branch.
    • Prereleases can be initiated automatically or manually with a specified release version.

Copilot AI review requested due to automatic review settings July 28, 2026 11:37
@SoulPancake
SoulPancake requested a review from a team as a code owner July 28, 2026 11:37
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.93%. Comparing base (9449df9) to head (a0b6dc7).

❌ Your project status has failed because the head coverage (69.93%) 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     #303   +/-   ##
=======================================
  Coverage   69.93%   69.93%           
=======================================
  Files         142      142           
  Lines       10774    10774           
=======================================
  Hits         7535     7535           
  Misses       3239     3239           

☔ View full report in Codecov by Harness.
📢 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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a new GitHub Actions workflow to enable pre-release (alpha/beta/rc) automation from the develop branch by invoking the shared openfga/.github reusable workflow, mirroring the existing stable release-please flow on main.

Changes:

  • Introduces .github/workflows/release-please-develop.yml to run pre-release automation on develop (push) or via workflow_dispatch.
  • Wires the workflow to the shared reusable release-please-prerelease.yml pinned by SHA, passing base-branch/staging-branch and release inputs.
  • Aligns trigger/guard behavior (startsWith(..., 'release:')) and permissions structure with the existing release-please.yml workflow.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

A new GitHub Actions workflow manages prerelease release-PR creation from develop, supporting push and manual triggers. Eligible runs invoke a pinned reusable workflow with branch, version, permissions, and release-signing configuration.

Changes

Develop prerelease workflow

Layer / File(s) Summary
Trigger and version input configuration
.github/workflows/release-please-develop.yml
Adds develop push triggering and manual dispatch with a required alpha, beta, or release-candidate version input.
Conditional prerelease job wiring
.github/workflows/release-please-develop.yml
Runs for manual dispatches or release: commits and delegates to the pinned reusable workflow using develop and release-develop branch settings, release inputs, permissions, and secrets.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant GitHub as GitHub event
  participant DevelopWorkflow as release-please-develop workflow
  participant ReusableWorkflow as release-please-prerelease workflow
  GitHub->>DevelopWorkflow: Push to develop or workflow_dispatch
  DevelopWorkflow->>DevelopWorkflow: Check event and release version
  DevelopWorkflow->>ReusableWorkflow: Invoke prerelease workflow with branches, inputs, and secrets
  ReusableWorkflow->>GitHub: Create or publish prerelease release PR
Loading

Suggested reviewers: aaguiarz, copilot

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the new release-please-develop pre-release workflow added in this PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/release-please-develop

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 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/release-please-develop.yml:
- Line 16: Update the trigger documentation comment on line 16 to state that
merging the release PR creates a signed tag and draft prerelease, while
publication is handled later by the publish workflow; remove the claim that this
trigger publishes the release.
- Line 44: Update the reusable workflow’s workflow_dispatch handling to pass
release-version through an env variable before any shell assignment, validate
that environment variable with the pre-release regex, and use it for validation
and commit operations. Then update the caller’s pinned reusable-workflow
reference in release-please-develop.yml so it points to the fixed 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 Plus

Run ID: f6781bbb-faa0-43b4-b7cb-0be802b6c7c4

📥 Commits

Reviewing files that changed from the base of the PR and between 9449df9 and a0b6dc7.

📒 Files selected for processing (1)
  • .github/workflows/release-please-develop.yml

#
# Triggers:
# * workflow_dispatch → build a release PR for an explicit pre-release version
# * push to develop → when the `release:` PR merges, tag + draft + publish

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Correct the publish claim in the trigger documentation.

The reusable workflow creates a signed tag and a draft prerelease; publishing is explicitly delegated to a later publish workflow. Update Line 16 to avoid misleading release operators. (raw.githubusercontent.com)

Proposed wording
-#   * push to develop   → when the `release:` PR merges, tag + draft + publish
+#   * push to develop   → when the `release:` PR merges, tag + draft pre-release
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# * push to develop → when the `release:` PR merges, tag + draft + publish
# * push to develop → when the `release:` PR merges, tag + draft pre-release
🤖 Prompt for 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.

In @.github/workflows/release-please-develop.yml at line 16, Update the trigger
documentation comment on line 16 to state that merging the release PR creates a
signed tag and draft prerelease, while publication is handled later by the
publish workflow; remove the claim that this trigger publishes the release.

Source: MCP tools

uses: openfga/.github/.github/workflows/release-please-prerelease.yml@835baf31562809ad9eb884c73efc5b79318f700f # pin@main
with:
trigger-event: ${{ github.event_name }}
release-version: ${{ inputs.release-version || '' }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/env bash
set -euo pipefail
curl -fsSL 'https://raw.githubusercontent.com/openfga/.github/835baf31562809ad9eb884c73efc5b79318f700f/.github/workflows/release-please-prerelease.yml' |
  rg -n 'inputs\.release-version|VERSION='

Repository: openfga/python-sdk

Length of output: 321


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Workflow files =="
fd -a 'release-please.*\.ya?ml|release.*\.ya?ml' .github/workflows 2>/dev/null | sed 's#^\./##' | sort

echo
echo "== Caller workflow excerpt =="
if [ -f .github/workflows/release-please-develop.yml ]; then
  nl -ba .github/workflows/release-please-develop.yml | sed -n '1,90p'
fi

echo
echo "== Reusable workflow excerpts around release-version =="
curl -fsSL 'https://raw.githubusercontent.com/openfga/.github/835baf31562809ad9eb884c73efc5b79318f700f/.github/workflows/release-please-prerelease.yml' > /tmp/release-prerelease.yml
nl -ba /tmp/release-prerelease.yml | sed -n '45,75p'
echo "---"
nl -ba /tmp/release-prerelease.yml | sed -n '125,148p'
echo "---"
nl -ba /tmp/release-prerelease.yml | sed -n '250,275p'

echo
echo "== Search all local workflow uses =="
rg -n "release-version|release-please-prerelease|uses:" .github/workflows || true

Repository: openfga/python-sdk

Length of output: 369


🌐 Web query:

GitHub Actions reusable workflow inputs passed to shell steps injection security

💡 Result:

When passing inputs to a reusable workflow, direct interpolation of these inputs into shell commands via ${{ inputs.x }} expression syntax creates a critical risk of shell command injection [1][2][3]. Because the ${{ }} syntax is expanded by GitHub Actions before the shell interprets the command, an attacker can supply malicious characters (such as ;, &&, or |) to break out of the intended command context and execute arbitrary code on the runner [1][2][3]. To secure reusable workflows against this vulnerability, implement the following defensive strategies: Use Environment Variable Indirection (Primary Defense) Never use the ${{ inputs.x }} syntax directly inside a run step [4][5]. Instead, assign the input to an environment variable in the env block of the step and reference that variable within your shell command [6][2][4][3]. By using variable expansion within the shell (e.g., "$MY_VAR"), the input is treated as data rather than executable code [4][5]. Example of vulnerable code: - run:./deploy.sh ${{ inputs.environment }} Example of secure code: - name: Deploy env: ENVIRONMENT: ${{ inputs.environment }} run:./deploy.sh "$ENVIRONMENT" Implement Input Validation Treat all reusable workflow inputs as untrusted, especially if they originate from user-controlled triggers [6][4][5]. Implement validation steps—such as regex checks or allowlists—at the beginning of your workflow to ensure the input conforms to expected formats before it is used in any downstream logic [6][3]. Apply Principle of Least Privilege Reusable workflows inherit the GITHUB_TOKEN permissions of the caller [6]. If an injection occurs, an attacker may leverage these permissions to modify repository contents or exfiltrate secrets [6][2][5]. Always set explicit, minimal permissions for the workflow using the permissions key, and prefer explicit secret passing over the secrets: inherit keyword to limit the scope of accessible secrets [6][5][7]. Automate Security Checks Incorporate security scanning tools to detect unsafe input interpolation automatically [2][4]. Tools such as CodeQL, actionlint, and zizmor can identify potential injection points during development and prevent vulnerable workflows from being merged or executed [4][5][7].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail
IFS=$'\n'

echo "== Caller workflow excerpt =="
if [ -f .github/workflows/release-please-develop.yml ]; then
  awk '{printf "%6d\t%s\n", NR, $0}' .github/workflows/release-please-develop.yml | sed -n '1,90p'
fi

echo
echo "== Reusable workflow excerpts around release-version =="
curl -fsSL 'https://raw.githubusercontent.com/openfga/.github/835baf31562809ad9eb884c73efc5b79318f700f/.github/workflows/release-please-prerelease.yml' > /tmp/release-prerelease.yml
awk '{printf "%6d\t%s\n", NR, $0}' /tmp/release-prerelease.yml | sed -n '55,70p'
echo "---"
awk '{printf "%6d\t%s\n", NR, $0}' /tmp/release-prerelease.yml | sed -n '125,148p'
echo "---"
awk '{printf "%6d\t%s\n", NR, $0}' /tmp/release-prerelease.yml | sed -n '250,275p'

echo
echo "== Search all local workflow uses =="
rg -n "release-version|release-please-prerelease|workflow_dispatch|on:" .github/workflows || true

Repository: openfga/python-sdk

Length of output: 8305


Use shell-safe input assignment in the reusable workflow before enabling this input.

This passes the workflow_dispatch.release-version input to a pinned reusable workflow whose workflow_dispatch branch interpolates ${{ inputs.release-version }} directly into shell assignments at the lines that validate and commit the requested version. A value containing shell metacharacters can execute before the pre-release regex check, so assign the input via env: first, validate the environment variable, and update the caller pin after the reusable workflow is fixed.

🤖 Prompt for 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.

In @.github/workflows/release-please-develop.yml at line 44, Update the reusable
workflow’s workflow_dispatch handling to pass release-version through an env
variable before any shell assignment, validate that environment variable with
the pre-release regex, and use it for validation and commit operations. Then
update the caller’s pinned reusable-workflow reference in
release-please-develop.yml so it points to the fixed revision.

Source: MCP tools

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.

3 participants