Skip to content

Conversation

@mtrezza
Copy link
Member

@mtrezza mtrezza commented Nov 29, 2025

Summary by CodeRabbit

  • Chores

    • Improved release detection for non-root packages to use tag-based comparisons when available, falling back to full commit listing otherwise.
    • Ensures release logic no longer depends on previous git head tracking.
  • Notes

    • No changes to public/exported interfaces or signatures.

✏️ Tip: You can customize this high-level summary in your review settings.

@parse-github-assistant
Copy link

🚀 Thanks for opening this pull request!

@coderabbitai
Copy link

coderabbitai bot commented Nov 29, 2025

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

Switches non-root package change detection in release.config.js to use a tag-based last release comparison (use package-specific tag if present; otherwise list commits). No exported/public API changes detected.

Changes

Cohort / File(s) Summary
Semantic Release Configuration
release.config.js
Replaced prior lastRelease.gitHead-based detection for non-root packages with logic that looks for a package-named tag and compares changes since that tag; if no tag exists, falls back to listing commits. No exported/public signatures changed.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Verify tag lookup and fallback behave correctly when tags are missing or ambiguous.
  • Confirm commit-list fallback produces equivalent coverage for change detection.

Possibly related PRs

  • ci: Fix auto-release #1073 — Related change to verifyConditionsCmd logic for per-package git history (previous approach used lastRelease.gitHead).

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request description is empty, missing all required sections including Issue link, Approach description, and Tasks checklist specified in the template. Add a complete pull request description following the template: include an issue link, describe the approach and changes made, and address applicable tasks.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'ci: Fix auto-release' clearly relates to the main change, which modifies CI/release configuration to fix auto-release functionality.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

📜 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 bf5a51c and 19aa374.

📒 Files selected for processing (1)
  • release.config.js (1 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.

@codecov
Copy link

codecov bot commented Nov 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 43.49%. Comparing base (2e143bf) to head (19aa374).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1074      +/-   ##
==========================================
+ Coverage   43.46%   43.49%   +0.02%     
==========================================
  Files          61       61              
  Lines        3587     3587              
==========================================
+ Hits         1559     1560       +1     
+ Misses       2028     2027       -1     

☔ 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.

Copy link

@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: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 2e143bf and bf5a51c.

📒 Files selected for processing (1)
  • release.config.js (2 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). (5)
  • GitHub Check: Test Dart 3.10, Windows
  • GitHub Check: Test Flutter 3.38, Windows
  • GitHub Check: Test Flutter beta
  • GitHub Check: Test Flutter 3.38, macOS
  • GitHub Check: Test Flutter 3.38, Ubuntu
🔇 Additional comments (1)
release.config.js (1)

88-88: Tag-based change detection logic for non-root packages looks correct, but double-check CI behavior on failure.

The new verifyConditionsCmd correctly:

  • Uses the last ${packageName}-* tag when present and diffs from that tag to HEAD for path-based detection.
  • Falls back to scanning the full history for packages/${packageName}/ when no such tag exists, enabling an initial release.

This achieves the intended behavior of skipping a release when the package directory hasn’t changed since its last tagged release. The quoting and interpolation of packageName in the command also look robust.

One thing to verify in your CI pipeline: an exit 1 from verifyConditions will surface as a failure from the @semantic-release/exec plugin, so ensure your workflow is explicitly treating “no changes, skipping release” as a non-problematic outcome (e.g., by how you orchestrate multi‑package runs or interpret job status).

Comment on lines 123 to 125
releasedLabels: ['state:released<%= nextRelease.channel ? `-\${nextRelease.channel}` : "" %>'],
failComment: false,
failTitle: false
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# First, let's find and examine the release.config.js file
fd -type f -name "release.config.js" | head -5

Repository: parse-community/Parse-SDK-Flutter

Length of output: 210


🌐 Web query:

EJS template literal interpolation escaped dollar sign behavior

💡 Result:

Short answer: escape it the same way you do in JavaScript template literals — prefix the $ with a backslash. Use ${} to render a literal "${...}" instead of starting interpolation. [1][2]

Notes:

  • If the template literal is inside an EJS expression that itself is parsed by EJS, make sure the backslash survives EJS output (you may need to double-escape in the EJS source so the rendered client/server JS gets a single backslash). Example:
    • In EJS source: <%= "Price is \\${price}" %> → renders: Price is ${price} in the generated HTML/JS.
  • EJS’s tags (<%= / <%- / <% %>) control whether EJS escapes HTML; the template-literal escaping behavior is pure JavaScript semantics after EJS has produced the JS string. [3][1]

Sources:
[1] MDN — Template literals (escaping $): ${...} disables interpolation.
[2] StackOverflow — escaping $ in template literals ($ or ${}).
[3] EJS docs/npm — EJS output tags and behavior.


Based on my verification through EJS and JavaScript template literal documentation, the original review comment is correct.

Here's what happens:

  1. In the EJS expression <%= nextRelease.channel ? -${nextRelease.channel} : "" %>, the backtick string -\${nextRelease.channel} is JavaScript code.
  2. When EJS evaluates this expression, the \${} escape sequence is a JavaScript template literal escape, not an EJS escape.
  3. In JavaScript template literals, \${} renders as a literal ${} string, preventing interpolation.
  4. Therefore, the output will be state:released-${nextRelease.channel} (literal text, not the actual channel value).

The suggested fix using string concatenation is the correct approach.


The releasedLabels EJS expression produces a literal ${nextRelease.channel} instead of the actual channel value.

The backtick string -\${nextRelease.channel} uses JavaScript's template literal escape sequence \${}, which renders as a literal string ${} rather than interpolating the value. This means you'll get state:released-${nextRelease.channel} instead of state:released-beta for beta releases.

Use string concatenation instead:

-        releasedLabels: ['state:released<%= nextRelease.channel ? `-\${nextRelease.channel}` : "" %>'],
+        releasedLabels: ['state:released<%= nextRelease.channel ? "-" + nextRelease.channel : "" %>'],
         failComment: false,
         failTitle: false

This will correctly yield state:released for stable releases and state:released-beta, state:released-next-major, etc., for channelled releases.

📝 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
releasedLabels: ['state:released<%= nextRelease.channel ? `-\${nextRelease.channel}` : "" %>'],
failComment: false,
failTitle: false
releasedLabels: ['state:released<%= nextRelease.channel ? "-" + nextRelease.channel : "" %>'],
failComment: false,
failTitle: false
🤖 Prompt for AI Agents
In release.config.js around lines 123-125, the EJS expression for releasedLabels
uses a backticked string with an escaped ${...} which renders the literal
`${nextRelease.channel}` instead of interpolating; replace that EJS expression
to build the label via string concatenation so it produces "state:released" for
no channel and "state:released-<channel>" when nextRelease.channel is set (e.g.
use "state:released" + (nextRelease.channel ? "-" + nextRelease.channel : "")
inside the <%= %>), keeping the array structure and the existing
failComment/failTitle settings unchanged.

@mtrezza mtrezza merged commit 2d53dd1 into parse-community:master Nov 29, 2025
10 of 11 checks passed
@mtrezza mtrezza deleted the ci/fix-ar branch November 29, 2025 15:44
@parseplatformorg
Copy link

🎉 This change has been released in version 9.3.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants