Skip to content

Conversation

lachlancollins
Copy link
Member

@lachlancollins lachlancollins commented Sep 26, 2025

🎯 Changes

Current workflow errors when there are no files to commit. It's also formatted incorrectly... oops

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm test:pr.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

Summary by CodeRabbit

  • Chores
    • Optimized release automation to skip commit/push steps when no changes are detected, reducing redundant commits and noise in version history.
    • Improves reliability and clarity of release runs and slightly speeds up CI by avoiding unnecessary operations.
    • No user-facing changes; application behavior and UI remain unchanged.

Copy link

changeset-bot bot commented Sep 26, 2025

⚠️ No Changeset found

Latest commit: 064d9f5

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

Copy link
Contributor

coderabbitai bot commented Sep 26, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Guard added to the “Commit version files” step in .github/workflows/release.yml to run git config/add/commit/push only when the working tree has changes (checked via git status --porcelain). User config moved inside the conditional; no other steps or exports changed.

Changes

Cohort / File(s) Summary of changes
Release workflow conditional commit
.github/workflows/release.yml
Wrap git config/add/commit/push in a conditional that checks for a non-empty git status --porcelain; defer user config inside the guard; no-op when no changes detected.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant GH as GitHub Actions Runner
  participant Step as "Commit version files"
  participant Git as git

  GH->>Step: Execute step
  Step->>Git: git status --porcelain
  alt Changes detected
    Step->>Git: git config user.name / user.email
    Step->>Git: git add -A
    Step->>Git: git commit -m "...version files"
    Step->>Git: git push
    Note right of Step: Commit/push only if there are modifications
  else No changes
    Step-->>GH: Skip git operations
    Note right of Step: No-op branch
  end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • ci: introduce changesets #9502 — Also modifies the release workflow’s version-file commit step, introducing changesets-based commit logic; closely related area.

Suggested reviewers

  • TkDodo

Poem

I sniff the repo’s breeze—no changes? I’ll refrain.
If patches scent the air, I hop to add and chain.
A tidy paw commits, a gentle push takes flight—
No wasted hops today, just carrots done up right.
(boop) 🥕🐇

✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-versioning

📜 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 2a15f36 and 064d9f5.

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

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

Copy link

nx-cloud bot commented Sep 26, 2025

View your CI Pipeline Execution ↗ for commit 064d9f5

Command Status Duration Result
nx affected --targets=test:sherif,test:knip,tes... ✅ Succeeded 30s View ↗
nx run-many --target=build --exclude=examples/*... ✅ Succeeded 1s View ↗

☁️ Nx Cloud last updated this comment at 2025-09-26 09:55:52 UTC

@lachlancollins lachlancollins merged commit 4b40dd9 into main Sep 26, 2025
4 of 5 checks passed
@lachlancollins lachlancollins deleted the fix-versioning branch September 26, 2025 09:55
Copy link
Contributor

Sizes for commit 064d9f5:

Branch Bundle Size
Main
This PR

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