Skip to content

Conversation

@myftija
Copy link
Collaborator

@myftija myftija commented Dec 8, 2025

Changes in this PR:

  • Arbitrary refs are now allowed when triggering the release workflow manually (ref must be on the main branch).
  • Release summary is now displayed in the GH job output; makes for a nicer experience when approving the release workflow.

@changeset-bot
Copy link

changeset-bot bot commented Dec 8, 2025

⚠️ No Changeset found

Latest commit: 676b7e8

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 8, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

The .github/workflows/release.yml workflow was updated to unify inputs by replacing prerelease_ref with a required ref input. A new show-release-summary job (📋 Release Summary) was added to extract the PR body from the "# Releases" header and append it to the GitHub step summary for the specific PR-merge scenario. The checkout step now uses a dynamic expression that selects the workflow dispatch ref input or github.sha. A new "Verify ref is on main" step (only for workflow_dispatch) checks that the provided ref is an ancestor of origin/main. Prerelease path validation of prerelease_ref was removed and all steps now reference ref.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Verify the dynamic checkout expression correctly handles workflow_dispatch and non-dispatch runs.
  • Review the show-release-summary job gating conditions and the PR body extraction logic (start from # Releases) for edge cases.
  • Confirm the git ancestry check in "Verify ref is on main" is correct and properly limited to workflow_dispatch.
  • Ensure all former prerelease_ref uses were replaced with ref, and no leftover validation steps remain.
  • Check renamed/renumbered validation steps and conditional expressions for consistency.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is incomplete. It lacks required sections from the template including issue reference, checklist, testing steps, changelog, and screenshots. Add the missing template sections: Closes #, the checklist with required items, Testing section with steps taken, Changelog with short description, and Screenshots section if applicable.
Title check ❓ Inconclusive The title is vague and overly generic, using non-descriptive language that doesn't convey the specific improvements made to the release workflow. Consider using a more specific title that mentions the key changes, such as 'chore(releases): allow arbitrary refs and add release summary output'.
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fb8b016 and 676b7e8.

📒 Files selected for processing (1)
  • .github/workflows/release.yml (4 hunks)

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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (3)
.github/workflows/release.yml (3)

33-46: Release summary extraction silently succeeds if section is missing.

The sed command (/^# Releases/,$p) will produce no output if the PR body lacks a "# Releases" header. While this may be acceptable for your workflow, consider whether empty step summaries on every Changesets PR is the desired behavior, or if you should add a check/validation.

If you want explicit notification when the section is missing, consider:

-          echo "$PR_BODY" | sed -n '/^# Releases/,$p' >> $GITHUB_STEP_SUMMARY
+          if echo "$PR_BODY" | grep -q '^# Releases'; then
+            echo "$PR_BODY" | sed -n '/^# Releases/,$p' >> $GITHUB_STEP_SUMMARY
+          else
+            echo "⚠️ No '# Releases' section found in PR body" >> $GITHUB_STEP_SUMMARY
+          fi

71-71: Clarify the conditional ref logic with explicit grouping.

While the ternary expression works correctly, adding parentheses improves readability for future maintainers:

-          ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.ref || github.sha }}
+          ref: ${{ (github.event_name == 'workflow_dispatch' && github.event.inputs.ref) || github.sha }}

73-79: Quote the ref variable in git commands for robustness.

Unquoted variables in shell commands can cause parsing issues if they contain special characters, though unlikely for SHAs/tags/branches. Add quotes for safety:

-          if ! git merge-base --is-ancestor ${{ github.event.inputs.ref }} origin/main; then
+          if ! git merge-base --is-ancestor "${{ github.event.inputs.ref }}" origin/main; then

Apply this fix to both the release job (line 76) and prerelease job (line 151).

Additionally, for consistency, add an if condition to the prerelease verification step (line 149) since the release job has one at line 74, even though the prerelease job itself is already gated by its job-level condition.

Also applies to: 149-154

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cf63fc9 and fb8b016.

📒 Files selected for processing (1)
  • .github/workflows/release.yml (4 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (21)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (8, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (7, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (5, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (1, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (2, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (4, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (6, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (3, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (5, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (8, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (4, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (6, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (1, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (7, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (3, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (2, 8)
  • GitHub Check: units / packages / 🧪 Unit Tests: Packages (1, 1)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - pnpm)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - npm)
  • GitHub Check: typecheck / typecheck
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (1)
.github/workflows/release.yml (1)

18-21: Input refactoring looks good.

The new ref input cleanly replaces prerelease_ref with a clear description covering all use cases (branch, tag, or SHA).

@myftija myftija merged commit b71bf89 into main Dec 9, 2025
27 of 28 checks passed
@myftija myftija deleted the minor-improvements-release-workflow branch December 9, 2025 10: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.

3 participants