Skip to content

Conversation

@Ansonhkg
Copy link
Collaborator

WHAT

  • Checkout exact workflow_run commit via head_sha

Copilot AI review requested due to automatic review settings October 10, 2025 14:49
@Ansonhkg Ansonhkg merged commit badad0d into master Oct 10, 2025
2 checks passed
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR improves the CI release workflow by ensuring proper handling of the workflow run commit and conditionally cleaning release branches. The changes focus on more reliable branch management and workflow execution.

  • Extracts branch name into a variable for consistency across operations
  • Replaces unconditional branch deletion with conditional logic that checks for branch existence
  • Removes the commitMode: github configuration parameter

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

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

2 participants