Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,14 @@ jobs:

- name: Reset release branch base
run: |
BRANCH="${{ github.event.workflow_run.head_branch }}"
git fetch --no-tags --prune origin
git push origin :changeset-release/${{ github.event.workflow_run.head_branch }} || true
if git ls-remote --heads origin "changeset-release/$BRANCH" | grep -q .; then
Copy link

Copilot AI Oct 10, 2025

Choose a reason for hiding this comment

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

The grep -q . pattern is unclear. Consider using a more explicit check like grep -q "changeset-release/$BRANCH" or | wc -l to make the intent clearer.

Suggested change
if git ls-remote --heads origin "changeset-release/$BRANCH" | grep -q .; then
if git ls-remote --heads origin "changeset-release/$BRANCH" | grep -q "changeset-release/$BRANCH"; then

Copilot uses AI. Check for mistakes.
git push origin :changeset-release/$BRANCH
echo "Deleted remote release branch changeset-release/$BRANCH"
else
echo "Remote release branch changeset-release/$BRANCH not found; nothing to delete"
fi

- name: Create Release Pull Request or Publish to npm
id: changesets
Expand All @@ -130,7 +136,6 @@ jobs:
publish: pnpm changeset publish --access public
commit: 'chore(release): version packages'
title: 'chore(release): version packages'
commitMode: github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
Expand Down