Skip to content

Fix homebrew-release workflow for retags and fork URLs#1155

Merged
sbryngelson merged 1 commit intoMFlowCode:masterfrom
sbryngelson:fix-homebrew-release-workflow
Feb 17, 2026
Merged

Fix homebrew-release workflow for retags and fork URLs#1155
sbryngelson merged 1 commit intoMFlowCode:masterfrom
sbryngelson:fix-homebrew-release-workflow

Conversation

@sbryngelson
Copy link
Member

@sbryngelson sbryngelson commented Feb 17, 2026

User description

Summary

  • Broaden URL matching patterns in the homebrew-release.yml workflow to handle any GitHub archive URL, not just MFlowCode/MFC. This fixes failures when the formula temporarily points at a fork during testing.
  • Skip the commit/push step gracefully when the formula is already up to date (e.g. retag scenario), instead of failing.
  • Triggered by the failure at https://github.com/MFlowCode/MFC/actions/runs/22085562970

Test plan

  • Verified the sed/awk patterns match both MFlowCode/MFC and fork URLs
  • The git diff --cached --quiet check correctly detects no-op updates

🤖 Generated with Claude Code


CodeAnt-AI Description

Fix homebrew-release workflow for retags and fork URLs

What Changed

  • Formula URL updates now match any GitHub archive URL, so releases succeed even when the formula temporarily points at a fork during testing
  • The SHA update logic targets the checksum immediately following the URL line (works regardless of which repo was previously referenced)
  • If the formula file has no changes (e.g., a retag), the workflow skips committing and pushing and emits a notice instead of failing

Impact

✅ Fewer failed release runs when formulas point to forks
✅ No-op retags no longer cause failed pushes
✅ More reliable formula updates during release workflows

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

Summary by CodeRabbit

  • Chores
    • Strengthened release automation with improved handling of edge cases and varied release scenarios.
    • Enhanced flexibility in processing release configurations to support a wider range of source patterns.
    • Optimized workflow efficiency through conditional logic that gracefully skips processing when no changes are detected.

The URL/SHA update patterns only matched MFlowCode/MFC URLs, so the
workflow failed when the formula temporarily pointed at a fork (e.g.
during testing). Also, the commit step failed when the formula was
already up to date (retag scenario). Broaden the URL patterns and
skip the push gracefully when there are no changes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings February 17, 2026 10:33
@codeant-ai
Copy link
Contributor

codeant-ai bot commented Feb 17, 2026

CodeAnt AI is reviewing your PR.


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 17, 2026

📝 Walkthrough

Walkthrough

The GitHub Actions Homebrew release workflow is updated to generalize URL pattern matching for any GitHub archive, expand SHA256 update logic to cover all GitHub-based URLs, and introduce conditional push behavior that skips commits when no changes are staged.

Changes

Cohort / File(s) Summary
GitHub Actions Workflow
.github/workflows/homebrew-release.yml
Generalized GitHub URL pattern matching for archive substitution; expanded SHA256 update detection to any GitHub URL; added conditional push logic to skip commit/push if no changes are staged, with appropriate notice messaging.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested labels

Review effort 3/5, size:M

Poem

🐰 A workflow so clever, with patterns so broad,
GitHub archives now match every road,
SHA256 updates flow where they please,
Conditional pushes put maintainers at ease,
No empty commits shall clutter the way!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main changes: fixing the homebrew-release workflow to handle retags and fork URLs, which aligns with the core objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The pull request description includes a clear summary of changes, motivation, test plan, and aligns well with the template structure.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

@codeant-ai codeant-ai bot added the size:S This PR changes 10-29 lines, ignoring generated files label Feb 17, 2026
@codeant-ai
Copy link
Contributor

codeant-ai bot commented Feb 17, 2026

CodeAnt AI finished reviewing your PR.

Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

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 fixes two issues in the homebrew-release.yml GitHub Actions workflow that were causing failures during retag scenarios and when testing with fork URLs:

Changes:

  • Broadened URL matching patterns in sed and awk commands to handle any GitHub archive URL (not just MFlowCode/MFC), enabling the workflow to correctly update formulas that temporarily point to forks during testing
  • Added graceful handling for no-op updates by checking staged changes before committing, preventing failures when the formula is already at the target version (retag scenario)

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.

🧹 Nitpick comments (1)
.github/workflows/homebrew-release.yml (1)

181-191: Summary step always claims bottles will build, even on no-op pushes.

When the formula is already up to date and no push occurs (retag scenario), this summary still says "The bottle.yml workflow will now build bottles for this release," which is misleading. Consider either gating this step on whether a push actually happened (e.g., via an output from the commit step) or adjusting the message.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/homebrew-release.yml around lines 181 - 191, The Summary
step unconditionally states "The bottle.yml workflow will now build bottles"
even for no-op retag pushes; update the step to only show that sentence when a
push actually occurred by gating it on a prior step's output (e.g., use an
output like steps.commit.outputs.pushed or steps.version.outputs.pushed) with
the if condition, or alternatively change the message to a neutral phrasing when
no push happened (use steps.version.outputs.version and
steps.sha256.outputs.sha256 as before, but wrap or vary the bottle.yml sentence
based on the push boolean so the Summary reflects the real outcome).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.github/workflows/homebrew-release.yml:
- Around line 181-191: The Summary step unconditionally states "The bottle.yml
workflow will now build bottles" even for no-op retag pushes; update the step to
only show that sentence when a push actually occurred by gating it on a prior
step's output (e.g., use an output like steps.commit.outputs.pushed or
steps.version.outputs.pushed) with the if condition, or alternatively change the
message to a neutral phrasing when no push happened (use
steps.version.outputs.version and steps.sha256.outputs.sha256 as before, but
wrap or vary the bottle.yml sentence based on the push boolean so the Summary
reflects the real outcome).

@sbryngelson sbryngelson merged commit 4073a4a into MFlowCode:master Feb 17, 2026
31 checks passed
@sbryngelson sbryngelson deleted the fix-homebrew-release-workflow branch February 17, 2026 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S This PR changes 10-29 lines, ignoring generated files

Development

Successfully merging this pull request may close these issues.

1 participant

Comments