Skip to content

Require explicit release publication opt-in - #144

Merged
hawkff merged 1 commit into
mainfrom
ci/005-explicit-release-publish
Jul 12, 2026
Merged

Require explicit release publication opt-in#144
hawkff merged 1 commit into
mainfrom
ci/005-explicit-release-publish

Conversation

@hawkff

@hawkff hawkff commented Jul 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • make release publication an explicit typed workflow input
  • keep release creation disabled by default
  • add a repository guard for workflow defaults and gates

Validation

  • Namespace CI run 29211339854 passed
  • CodeRabbit CLI reported no findings

Greptile Summary

This PR makes release publication an explicit opt-in workflow action. The main changes are:

  • A boolean publish input with default: false in the release workflow.
  • A positive publish-job gate using inputs.publish.
  • A CI guard that checks the release workflow keeps the safe publish gate.

Confidence Score: 4/5

This is close, but I would fix the remaining guard behavior before merging.

  • The release workflow now defaults publication off.
  • The publish job only runs when the boolean input is explicitly enabled.
  • The new guard can still block safe equivalent publish conditions.

scripts/check-release-publish-gate.sh

Important Files Changed

Filename Overview
.github/workflows/release.yml Adds a default-disabled boolean publish input and gates release publication on that input.
.github/workflows/ci.yml Adds the release publication guard to the CI guard job.
scripts/check-release-publish-gate.sh Adds checks for the release publish input, publish job gate, and related permissions.

Reviews (3): Last reviewed commit: "fix(ci): require explicit release public..." | Re-trigger Greptile

Greptile also left 1 inline comment on this PR.

@coderabbitai

coderabbitai Bot commented Jul 12, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 15 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e493dc4b-0138-433c-9b53-6170fb70bb0f

📥 Commits

Reviewing files that changed from the base of the PR and between ff4269f and 6b447e9.

📒 Files selected for processing (3)
  • .github/workflows/ci.yml
  • .github/workflows/release.yml
  • scripts/check-release-publish-gate.sh

Comment @coderabbitai help to get the list of available commands.

Comment thread scripts/check-release-publish-gate.sh Outdated
@hawkff
hawkff force-pushed the ci/005-explicit-release-publish branch from b588cb9 to 1585abe Compare July 12, 2026 22:50
Comment thread scripts/check-release-publish-gate.sh Outdated
@hawkff
hawkff force-pushed the ci/005-explicit-release-publish branch from 1585abe to 6b447e9 Compare July 12, 2026 23:06
local block=$1
local line
while IFS= read -r line; do
if [[ "$line" =~ ^[[:space:]]+if:[[:space:]]*\$\{\{[[:space:]]*inputs\.publish[[:space:]]*==[[:space:]]*true[[:space:]]*\}\}[[:space:]]*$ ]]; then

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Condition check remains exact

This guard still requires one exact spelling of the publish condition. A workflow with the same boolean input defaulting to false and an equivalent positive gate such as if: ${{ inputs.publish }} remains explicitly opt-in, but this regex rejects it and blocks CI. The guard should check the publish job's safety property instead of requiring this single expression form.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

No change. The guard intentionally requires the explicit typed comparison from the release policy: inputs.publish == true. Shorthand truthiness is excluded so future edits cannot weaken the positive boolean opt-in. Field order and unrelated job settings remain flexible.

@hawkff

hawkff commented Jul 12, 2026

Copy link
Copy Markdown
Owner Author

Latest commit passed Namespace CI run 29212802158, including the release-gate self-test.

@hawkff
hawkff merged commit 6541ec1 into main Jul 12, 2026
9 checks passed
@hawkff
hawkff deleted the ci/005-explicit-release-publish branch July 13, 2026 01:29
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.

1 participant