Fix Homebrew CI and add automated release workflow#1120
Conversation
- Fix homebrew.yml to use correct tap prefix (mflowcode/test/mfc) - Add homebrew-release.yml to automate formula updates on new tags - Update formula to v5.2.0 to match homebrew-mfc tap Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use TAP_REPO_TOKEN secret (already exists in MFlowCode/MFC) - Restore path restrictions in homebrew.yml for production Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When triggered by PR, runs in dry-run mode using v5.2.0 as test version. This allows testing the workflow from a PR before merging. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Fork PRs cannot access repository secrets, so skip steps that require TAP_REPO_TOKEN. For PRs, only validate version parsing and SHA256. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
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 · |
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ✨ Finishing touches🧪 Generate unit tests (beta)
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. Comment |
| name: Update homebrew-mfc tap | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Determine version | ||
| id: version | ||
| run: | | ||
| if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then | ||
| VERSION="${{ inputs.version }}" | ||
| elif [[ "${{ github.event_name }}" == "pull_request" ]]; then | ||
| # Use existing version for PR testing | ||
| VERSION="5.2.0" | ||
| echo "::notice::PR test mode - using version $VERSION" | ||
| else | ||
| # Extract version from tag (remove 'v' prefix) | ||
| VERSION="${GITHUB_REF#refs/tags/v}" | ||
| fi | ||
|
|
||
| if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then | ||
| echo "::error::Invalid version format: $VERSION (expected X.Y.Z)" | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | ||
| echo "Version: $VERSION" | ||
|
|
||
| - name: Compute SHA256 of release tarball | ||
| id: sha256 | ||
| run: | | ||
| VERSION="${{ steps.version.outputs.version }}" | ||
| URL="https://github.com/MFlowCode/MFC/archive/refs/tags/v${VERSION}.tar.gz" | ||
|
|
||
| echo "Downloading tarball from: $URL" | ||
|
|
||
| # Verify URL is reachable | ||
| HTTP_CODE=$(curl -sI -w "%{http_code}" -o /dev/null "$URL") | ||
| if [[ "$HTTP_CODE" != "200" && "$HTTP_CODE" != "302" ]]; then | ||
| echo "::error::Release tarball not found at $URL (HTTP $HTTP_CODE)" | ||
| echo "::error::Make sure the tag v${VERSION} exists and the release is published" | ||
| exit 1 | ||
| fi | ||
|
|
||
| # Compute SHA256 | ||
| SHA256=$(curl -sL "$URL" | sha256sum | awk '{print $1}') | ||
|
|
||
| if [[ -z "$SHA256" || "$SHA256" == "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" ]]; then | ||
| echo "::error::Failed to compute SHA256 (empty file or download failed)" | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "sha256=$SHA256" >> "$GITHUB_OUTPUT" | ||
| echo "SHA256: $SHA256" | ||
|
|
||
| - name: PR test summary | ||
| if: ${{ github.event_name == 'pull_request' }} | ||
| run: | | ||
| echo "## PR Test Mode" >> $GITHUB_STEP_SUMMARY | ||
| echo "" >> $GITHUB_STEP_SUMMARY | ||
| echo "Validated:" >> $GITHUB_STEP_SUMMARY | ||
| echo "- Version parsing: v${{ steps.version.outputs.version }}" >> $GITHUB_STEP_SUMMARY | ||
| echo "- SHA256 computation: \`${{ steps.sha256.outputs.sha256 }}\`" >> $GITHUB_STEP_SUMMARY | ||
| echo "" >> $GITHUB_STEP_SUMMARY | ||
| echo "Skipped (secrets not available for fork PRs):" >> $GITHUB_STEP_SUMMARY | ||
| echo "- Checkout homebrew-mfc" >> $GITHUB_STEP_SUMMARY | ||
| echo "- Update formula" >> $GITHUB_STEP_SUMMARY | ||
| echo "- Push to tap" >> $GITHUB_STEP_SUMMARY | ||
| echo "" >> $GITHUB_STEP_SUMMARY | ||
| echo "The full workflow will run when a \`v*\` tag is pushed after merge." >> $GITHUB_STEP_SUMMARY | ||
|
|
||
| - name: Checkout homebrew-mfc tap | ||
| if: ${{ github.event_name != 'pull_request' }} | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| repository: MFlowCode/homebrew-mfc | ||
| token: ${{ secrets.TAP_REPO_TOKEN }} | ||
| path: homebrew-mfc | ||
|
|
||
| - name: Update formula | ||
| if: ${{ github.event_name != 'pull_request' }} | ||
| run: | | ||
| VERSION="${{ steps.version.outputs.version }}" | ||
| SHA256="${{ steps.sha256.outputs.sha256 }}" | ||
| FORMULA="homebrew-mfc/Formula/mfc.rb" | ||
|
|
||
| echo "Updating formula to v${VERSION}..." | ||
|
|
||
| # Update URL | ||
| sed -i "s|url \"https://github.com/MFlowCode/MFC/archive/refs/tags/v[^\"]*\.tar\.gz\"|url \"https://github.com/MFlowCode/MFC/archive/refs/tags/v${VERSION}.tar.gz\"|" "$FORMULA" | ||
|
|
||
| # Update SHA256 (the one right after url, not bottle SHAs) | ||
| # This uses awk to only update the first sha256 after the url line | ||
| awk -v newsha="$SHA256" ' | ||
| /^ url "https:\/\/github.com\/MFlowCode\/MFC/ { found_url=1 } | ||
| found_url && /^ sha256 "/ && !updated { | ||
| sub(/sha256 "[^"]*"/, "sha256 \"" newsha "\"") | ||
| updated=1 | ||
| } | ||
| { print } | ||
| ' "$FORMULA" > "$FORMULA.tmp" && mv "$FORMULA.tmp" "$FORMULA" | ||
|
|
||
| # Remove existing bottle block (new bottles will be built by bottle.yml) | ||
| # This removes everything between "bottle do" and the matching "end" | ||
| awk ' | ||
| /^ bottle do/ { in_bottle=1; next } | ||
| in_bottle && /^ end/ { in_bottle=0; next } | ||
| !in_bottle { print } | ||
| ' "$FORMULA" > "$FORMULA.tmp" && mv "$FORMULA.tmp" "$FORMULA" | ||
|
|
||
| echo "Updated formula:" | ||
| head -30 "$FORMULA" | ||
|
|
||
| - name: Validate updated formula | ||
| if: ${{ github.event_name != 'pull_request' }} | ||
| run: | | ||
| cd homebrew-mfc | ||
| echo "Checking Ruby syntax..." | ||
| ruby -c Formula/mfc.rb | ||
|
|
||
| echo "Verifying URL and SHA256 were updated..." | ||
| grep -q "v${{ steps.version.outputs.version }}.tar.gz" Formula/mfc.rb || (echo "::error::URL not updated"; exit 1) | ||
| grep -q "${{ steps.sha256.outputs.sha256 }}" Formula/mfc.rb || (echo "::error::SHA256 not updated"; exit 1) | ||
|
|
||
| echo "Formula validation passed!" | ||
|
|
||
| - name: Commit and push to homebrew-mfc | ||
| if: ${{ github.event_name != 'pull_request' && github.event.inputs.dry_run != 'true' }} | ||
| run: | | ||
| cd homebrew-mfc | ||
| VERSION="${{ steps.version.outputs.version }}" | ||
|
|
||
| git config user.name "github-actions[bot]" | ||
| git config user.email "github-actions[bot]@users.noreply.github.com" | ||
|
|
||
| git add Formula/mfc.rb | ||
| git commit -m "Update MFC to v${VERSION}" | ||
|
|
||
| echo "Pushing to homebrew-mfc..." | ||
| git push origin main | ||
|
|
||
| echo "Successfully pushed formula update!" | ||
| echo "The bottle.yml workflow in homebrew-mfc will now build bottles automatically." | ||
|
|
||
| - name: Dry run summary | ||
| if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.dry_run == 'true' }} | ||
| run: | | ||
| echo "::notice::DRY RUN - skipped push to homebrew-mfc" | ||
| echo "" | ||
| echo "Would have committed the following changes:" | ||
| cd homebrew-mfc | ||
| git diff Formula/mfc.rb | ||
|
|
||
| - name: Summary | ||
| if: ${{ github.event_name != 'pull_request' }} | ||
| run: | | ||
| VERSION="${{ steps.version.outputs.version }}" | ||
| echo "## Homebrew Formula Updated" >> $GITHUB_STEP_SUMMARY | ||
| echo "" >> $GITHUB_STEP_SUMMARY | ||
| echo "- **Version:** v${VERSION}" >> $GITHUB_STEP_SUMMARY | ||
| echo "- **SHA256:** \`${{ steps.sha256.outputs.sha256 }}\`" >> $GITHUB_STEP_SUMMARY | ||
| echo "- **Tap:** [MFlowCode/homebrew-mfc](https://github.com/MFlowCode/homebrew-mfc)" >> $GITHUB_STEP_SUMMARY | ||
| echo "" >> $GITHUB_STEP_SUMMARY | ||
| echo "The [bottle.yml](https://github.com/MFlowCode/homebrew-mfc/actions/workflows/bottle.yml) workflow will now build bottles for this release." >> $GITHUB_STEP_SUMMARY |
Check warning
Code scanning / CodeQL
Workflow does not contain permissions Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 1 month ago
To fix this, explicitly set least‑privilege GITHUB_TOKEN permissions in the workflow. This workflow does not need to write to the current repository or to issues/PRs; it only needs to read repository contents (and uses a separate PAT secret for pushing to homebrew-mfc). Therefore, the safest fix is to add a top‑level permissions: block with contents: read. Placing it at the root (next to name and on) applies to all jobs, including update-homebrew-tap, without changing any behavior.
Concretely:
-
Edit
.github/workflows/homebrew-release.yml. -
After the existing
name: Update Homebrew Formula on Releaseline, insert:permissions: contents: read
No additional methods, imports, or other definitions are needed; this is a pure configuration change in the workflow file.
| @@ -1,4 +1,6 @@ | ||
| name: Update Homebrew Formula on Release | ||
| permissions: | ||
| contents: read | ||
|
|
||
| # Triggers when a new version tag is pushed | ||
| on: |
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
There was a problem hiding this comment.
High-level Suggestion
Replace the brittle sed and awk commands used for modifying the Homebrew formula with a more robust Ruby script. This makes the release automation less likely to fail due to future formatting changes in the formula file. [High-level, importance: 8]
Solution Walkthrough:
Before:
# In .github/workflows/homebrew-release.yml
- name: Update formula
run: |
FORMULA="homebrew-mfc/Formula/mfc.rb"
# Update URL with sed
sed -i "s|url \"https...\"|url \"https...${VERSION}.tar.gz\"|" "$FORMULA"
# Update SHA256 with awk, assuming it's after the url
awk -v newsha="$SHA256" '
/^ url "/ { found_url=1 }
found_url && /^ sha256 "/ { ... sub(...) ... }
{ print }
' "$FORMULA" > "$FORMULA.tmp" && mv "$FORMULA.tmp" "$FORMULA"
# Remove bottle block with awk
awk '/^ bottle do/,/^ end/ { next } { print }' "$FORMULA" > ...
After:
# In .github/workflows/homebrew-release.yml
- name: Update formula
run: |
# Use a dedicated Ruby script for safer manipulation
ruby ./path/to/update_formula.rb \
--file="homebrew-mfc/Formula/mfc.rb" \
--version="${{ steps.version.outputs.version }}" \
--sha256="${{ steps.sha256.outputs.sha256 }}"
# In ./path/to/update_formula.rb (conceptual)
# ... Ruby code to parse arguments ...
content = File.read(formula_path)
# Use robust regex to replace url and sha256
content.sub!(/url "[^"]+"/, "url \"...v#{version}.tar.gz\"")
content.sub!(/sha256 "[^"]+"/, "sha256 \"#{sha256}\"")
# Remove bottle block
content.gsub!(/ bottle do\n(.+\n)+? end\n/, "")
File.write(formula_path, content)
| - name: Commit and push to homebrew-mfc | ||
| if: ${{ github.event_name != 'pull_request' && github.event.inputs.dry_run != 'true' }} | ||
| run: | | ||
| cd homebrew-mfc | ||
| VERSION="${{ steps.version.outputs.version }}" | ||
|
|
||
| git config user.name "github-actions[bot]" | ||
| git config user.email "github-actions[bot]@users.noreply.github.com" | ||
|
|
||
| git add Formula/mfc.rb | ||
| git commit -m "Update MFC to v${VERSION}" | ||
|
|
||
| echo "Pushing to homebrew-mfc..." | ||
| git push origin main | ||
|
|
||
| echo "Successfully pushed formula update!" | ||
| echo "The bottle.yml workflow in homebrew-mfc will now build bottles automatically." |
There was a problem hiding this comment.
Suggestion: Instead of pushing directly to the main branch of the homebrew-mfc repository, modify the workflow to open a pull request with the proposed formula changes. [security, importance: 8]
| - name: Commit and push to homebrew-mfc | |
| if: ${{ github.event_name != 'pull_request' && github.event.inputs.dry_run != 'true' }} | |
| run: | | |
| cd homebrew-mfc | |
| VERSION="${{ steps.version.outputs.version }}" | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add Formula/mfc.rb | |
| git commit -m "Update MFC to v${VERSION}" | |
| echo "Pushing to homebrew-mfc..." | |
| git push origin main | |
| echo "Successfully pushed formula update!" | |
| echo "The bottle.yml workflow in homebrew-mfc will now build bottles automatically." | |
| - name: Create Pull Request to homebrew-mfc | |
| if: ${{ github.event_name != 'pull_request' && github.event.inputs.dry_run != 'true' }} | |
| uses: peter-evans/create-pull-request@v6 | |
| with: | |
| path: homebrew-mfc | |
| token: ${{ secrets.TAP_REPO_TOKEN }} | |
| commit-message: "Update MFC to v${{ steps.version.outputs.version }}" | |
| title: "Update MFC to v${{ steps.version.outputs.version }}" | |
| body: | | |
| Automated update of the `mfc` formula to version `${{ steps.version.outputs.version }}`. | |
| - **Version:** `${{ steps.version.outputs.version }}` | |
| - **SHA256:** `${{ steps.sha256.outputs.sha256 }}` | |
| This PR was generated automatically by the release workflow. | |
| branch: "release/mfc-v${{ steps.version.outputs.version }}" | |
| base: main | |
| delete-branch: true |
| MFC_PREFIX="$(brew --prefix mflowcode/test/mfc)" | ||
| echo "MFC prefix: $MFC_PREFIX" | ||
|
|
||
| echo "1. Checking binaries exist and are executable..." | ||
| test -f $(brew --prefix)/bin/mfc && test -x $(brew --prefix)/bin/mfc |
There was a problem hiding this comment.
Suggestion: In the test step, replace $(brew --prefix) with the tap-specific "$MFC_PREFIX" variable for all file and executable checks to ensure tests target the correct installation. [possible issue, importance: 7]
| MFC_PREFIX="$(brew --prefix mflowcode/test/mfc)" | |
| echo "MFC prefix: $MFC_PREFIX" | |
| echo "1. Checking binaries exist and are executable..." | |
| test -f $(brew --prefix)/bin/mfc && test -x $(brew --prefix)/bin/mfc | |
| MFC_PREFIX="$(brew --prefix mflowcode/test/mfc)" | |
| ... | |
| test -f "$MFC_PREFIX/bin/mfc" && test -x "$MFC_PREFIX/bin/mfc" |
| elif [[ "${{ github.event_name }}" == "pull_request" ]]; then | ||
| # Use existing version for PR testing | ||
| VERSION="5.2.0" | ||
| echo "::notice::PR test mode - using version $VERSION" |
There was a problem hiding this comment.
Suggestion: Instead of hard-coding the version for pull request tests, dynamically extract the version from the packaging/homebrew/mfc.rb file. [general, importance: 6]
| elif [[ "${{ github.event_name }}" == "pull_request" ]]; then | |
| # Use existing version for PR testing | |
| VERSION="5.2.0" | |
| echo "::notice::PR test mode - using version $VERSION" | |
| elif [[ "${{ github.event_name }}" == "pull_request" ]]; then | |
| # Extract version from formula to avoid hard-coding | |
| VERSION=$(grep -Po 'refs/tags/v\K[0-9]+\.[0-9]+\.[0-9]+' packaging/homebrew/mfc.rb) | |
| echo "::notice::PR test mode - using version $VERSION (extracted from formula)" |
| - name: Compute SHA256 of release tarball | ||
| id: sha256 | ||
| run: | | ||
| VERSION="${{ steps.version.outputs.version }}" | ||
| URL="https://github.com/MFlowCode/MFC/archive/refs/tags/v${VERSION}.tar.gz" |
There was a problem hiding this comment.
Suggestion: Add set -euo pipefail to the beginning of multi-line run steps to enable stricter error handling in the bash scripts. [general, importance: 5]
| - name: Compute SHA256 of release tarball | |
| id: sha256 | |
| run: | | |
| VERSION="${{ steps.version.outputs.version }}" | |
| URL="https://github.com/MFlowCode/MFC/archive/refs/tags/v${VERSION}.tar.gz" | |
| - name: Compute SHA256 of release tarball | |
| id: sha256 | |
| run: | | |
| set -euo pipefail | |
| VERSION="${{ steps.version.outputs.version }}" | |
| URL="https://github.com/MFlowCode/MFC/archive/refs/tags/v${VERSION}.tar.gz" |
Nitpicks 🔍
|
|
CodeAnt AI finished reviewing your PR. |
There was a problem hiding this comment.
Pull request overview
This PR fixes a bug in the Homebrew formula testing workflow and adds a new automated release workflow for updating the Homebrew formula when version tags are pushed. The changes update the formula version to v5.2.0 and ensure proper tap-qualified naming is used throughout the testing process.
Changes:
- Fixed
homebrew.ymlto use the correct tap-qualified prefix (mflowcode/test/mfc) when verifying the test installation - Added
homebrew-release.ymlworkflow to automatically update the formula in the homebrew-mfc tap when newv*tags are pushed - Updated formula version from v5.1.5 to v5.2.0 with corresponding SHA256 hash
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 7 comments.
| File | Description |
|---|---|
| packaging/homebrew/mfc.rb | Updates formula to v5.2.0 with new tarball URL and SHA256 hash |
| .github/workflows/homebrew.yml | Fixes tap prefix references to use mflowcode/test/mfc instead of mfc throughout test and cleanup steps |
| .github/workflows/homebrew-release.yml | New workflow to automate formula updates in homebrew-mfc tap when version tags are pushed, with PR testing and dry-run capabilities |
| cd homebrew-mfc | ||
| git diff Formula/mfc.rb |
There was a problem hiding this comment.
The dry run summary step will fail because it tries to cd homebrew-mfc, but the "Checkout homebrew-mfc tap" step (line 95-101) only runs when github.event_name != 'pull_request'. In dry-run mode during workflow_dispatch, the homebrew-mfc directory won't exist. The condition should also check that the directory was actually checked out.
| cd homebrew-mfc | |
| git diff Formula/mfc.rb | |
| if [ -d homebrew-mfc ]; then | |
| cd homebrew-mfc | |
| git diff Formula/mfc.rb | |
| else | |
| echo "::notice::homebrew-mfc tap directory not found; nothing to diff." | |
| fi |
| git diff Formula/mfc.rb | ||
|
|
||
| - name: Summary | ||
| if: ${{ github.event_name != 'pull_request' }} |
There was a problem hiding this comment.
The Summary step (lines 177-187) will run even in dry-run mode because its condition is github.event_name != 'pull_request', which includes workflow_dispatch dry runs. This will display "Homebrew Formula Updated" even though nothing was actually pushed in dry-run mode. Consider updating the condition to also exclude dry runs: github.event_name != 'pull_request' && github.event.inputs.dry_run != 'true'
| if: ${{ github.event_name != 'pull_request' }} | |
| if: ${{ github.event_name != 'pull_request' && github.event.inputs.dry_run != 'true' }} |
| jobs: | ||
| update-homebrew-tap: | ||
| name: Update homebrew-mfc tap | ||
| runs-on: ubuntu-latest |
There was a problem hiding this comment.
This workflow doesn't explicitly declare permissions at the workflow or job level. While it will inherit default permissions, explicitly declaring permissions is a security best practice. Consider adding permissions: contents: read at the workflow level to follow the principle of least privilege, similar to deploy-tap.yml line 20-21.
| VERSION="${GITHUB_REF#refs/tags/v}" | ||
| fi | ||
|
|
||
| if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then |
There was a problem hiding this comment.
The version validation regex ^[0-9]+\.[0-9]+\.[0-9]+$ only accepts semantic versions with exactly three numeric components (X.Y.Z). This doesn't support pre-release versions like 5.2.0-beta1 or 5.2.0-rc1. If MFC uses pre-release tags, this validation will reject them. Consider whether pre-release versions need to be supported, and if so, update the regex accordingly.
| on: | ||
| push: | ||
| tags: | ||
| - 'v*' |
There was a problem hiding this comment.
Both deploy-tap.yml (line 17) and this new homebrew-release.yml workflow will trigger when a version tag is pushed. This could lead to a race condition where both workflows try to update the homebrew-mfc tap simultaneously. Consider:
- Disabling tag handling in
deploy-tap.ymlby removing thecreate:trigger and adding a path filter to exclude tag events, or - Coordinating the two workflows so only one handles tag releases
The two workflows have different approaches: deploy-tap.yml updates the formula in this repo first then pushes to the tap, while homebrew-release.yml directly updates the tap repo. Having both active for tag events could cause conflicts.
| fi | ||
|
|
||
| # Compute SHA256 | ||
| SHA256=$(curl -sL "$URL" | sha256sum | awk '{print $1}') |
There was a problem hiding this comment.
This workflow uses sha256sum which is the Linux version, but other workflows in this repository (deploy-tap.yml line 58 and homebrew.yml line 104) use shasum -a 256 instead. While both work on ubuntu-latest, using shasum would be more consistent with the existing codebase conventions and also more portable if the runner ever changes to macOS.
| awk ' | ||
| /^ bottle do/ { in_bottle=1; next } | ||
| in_bottle && /^ end/ { in_bottle=0; next } | ||
| !in_bottle { print } | ||
| ' "$FORMULA" > "$FORMULA.tmp" && mv "$FORMULA.tmp" "$FORMULA" |
There was a problem hiding this comment.
The awk script to remove bottle blocks assumes the bottle block is indented with exactly two spaces (matching the pattern /^ bottle do/ and /^ end/). If the formula structure changes or uses different indentation, this could fail silently and leave the bottle block in place. Consider adding validation after this step to ensure the bottle block was removed, or use a more robust approach like checking for bottle do without the strict indentation requirement.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
This PR is being reviewed by Cursor Bugbot
Details
You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
| echo "- **SHA256:** \`${{ steps.sha256.outputs.sha256 }}\`" >> $GITHUB_STEP_SUMMARY | ||
| echo "- **Tap:** [MFlowCode/homebrew-mfc](https://github.com/MFlowCode/homebrew-mfc)" >> $GITHUB_STEP_SUMMARY | ||
| echo "" >> $GITHUB_STEP_SUMMARY | ||
| echo "The [bottle.yml](https://github.com/MFlowCode/homebrew-mfc/actions/workflows/bottle.yml) workflow will now build bottles for this release." >> $GITHUB_STEP_SUMMARY |
There was a problem hiding this comment.
Misleading summary output during dry run mode
Low Severity
The "Summary" step runs when dry_run=true because its condition only checks github.event_name != 'pull_request', not the dry_run flag. This causes the job summary to incorrectly state "Homebrew Formula Updated" and "The bottle.yml workflow will now build bottles for this release" even though the push was skipped. The condition at line 178 needs to also exclude dry runs, similar to the commit/push step at line 151.


User description
User description
Summary
homebrew.ymlto use correct tap prefix (mflowcode/test/mfcinstead ofmfc)homebrew-release.ymlto automate formula updates when new version tags are pushedDetails
Bug fix (homebrew.yml)
The test step was using
$(brew --prefix mfc)but the formula is installed from a temporary tap asmflowcode/test/mfc. This caused the "Test MFC installation" step to fail.New release workflow (homebrew-release.yml)
When a new
v*tag is pushed:Supports
workflow_dispatchwith dry-run option for manual testing.Test plan
Generated with Claude Code
PR Type
Enhancement, Bug fix
Description
Fix Homebrew CI test to use correct tap-qualified formula name
Add automated release workflow to update formula on version tags
Update MFC formula to v5.2.0 with new SHA256 hash
Support manual testing via workflow_dispatch with dry-run option
Diagram Walkthrough
File Walkthrough
mfc.rb
Update formula to v5.2.0packaging/homebrew/mfc.rb
homebrew-release.yml
Add automated Homebrew formula release workflow.github/workflows/homebrew-release.yml
changes
permissions
homebrew.yml
Fix Homebrew CI test with correct tap prefix.github/workflows/homebrew.yml
mflowcode/test/mfcbrew --prefix mfcwith variable$MFC_PREFIXCodeAnt-AI Description
Fix Homebrew CI tests, update formula to v5.2.0, and add automated Homebrew release workflow
What Changed
Impact
✅ Fewer CI Homebrew test failures✅ Automated Homebrew formula updates on tagged releases✅ Safer PR testing of release automation without exposing secrets💡 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:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
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:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
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.