Skip to content

Update bench.yml #973

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 2, 2025
Merged

Update bench.yml #973

merged 1 commit into from
Aug 2, 2025

Conversation

sbryngelson
Copy link
Member

@sbryngelson sbryngelson commented Aug 2, 2025

User description

add bench for benchmarking


PR Type

Enhancement


Description

  • Expand benchmark workflow trigger conditions

  • Add 'wilfonba' user to authorized PR submitters

  • Simplify conditional formatting in GitHub Actions


Diagram Walkthrough

flowchart LR
  A["GitHub PR Event"] --> B["Check Repository"]
  B --> C["Check File Changes"]
  C --> D["Check User Authorization"]
  D --> E["Run Benchmark"]
  F["sbryngelson"] --> D
  G["wilfonba"] --> D
Loading

File Walkthrough

Relevant files
Configuration changes
bench.yml
Expand benchmark workflow user authorization                         

.github/workflows/bench.yml

  • Reformatted multi-line conditional into single line
  • Added 'wilfonba' to authorized users for benchmark triggers
  • Removed spacing around operators for consistency
+1/-4     

@Copilot Copilot AI review requested due to automatic review settings August 2, 2025 18:27
Copy link

qodo-merge-pro bot commented Aug 2, 2025

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Readability Issue

The complex conditional logic has been compressed into a single line, making it difficult to read and maintain. The original multi-line format was more readable and easier to debug.

if: ${{ github.repository=='MFlowCode/MFC' && needs.file-changes.outputs.checkall=='true' && ((github.event_name=='pull_request_review' && github.event.review.state=='approved') || (github.event_name=='pull_request' && (github.event.pull_request.user.login=='sbryngelson' || github.event.pull_request.user.login=='wilfonba'))) }}
needs: file-changes

Copy link
Contributor

@Copilot 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 updates the GitHub Actions workflow configuration for benchmarking to add an additional authorized user and reformats the conditional logic. The change allows both 'sbryngelson' and 'wilfonba' users to trigger benchmark runs on pull requests.

Key Changes

  • Added 'wilfonba' as an authorized user who can trigger benchmarks via pull requests
  • Reformatted the conditional logic from multi-line to single-line format

(github.event_name == 'pull_request_review' && github.event.review.state == 'approved') ||
(github.event_name == 'pull_request' && github.event.pull_request.user.login == 'sbryngelson')
) }}
if: ${{ github.repository=='MFlowCode/MFC' && needs.file-changes.outputs.checkall=='true' && ((github.event_name=='pull_request_review' && github.event.review.state=='approved') || (github.event_name=='pull_request' && (github.event.pull_request.user.login=='sbryngelson' || github.event.pull_request.user.login=='wilfonba'))) }}
Copy link
Preview

Copilot AI Aug 2, 2025

Choose a reason for hiding this comment

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

[nitpick] This complex conditional logic should be split across multiple lines for better readability and maintainability. The original multi-line format was more readable than this single long line.

Copilot uses AI. Check for mistakes.

Copy link

qodo-merge-pro bot commented Aug 2, 2025

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
General
Improve conditional readability formatting

The complex conditional logic is difficult to read and maintain when compressed
into a single line. Breaking it into multiple lines with proper indentation
would improve readability and make future modifications easier.

.github/workflows/bench.yml [27]

-if: ${{ github.repository=='MFlowCode/MFC' && needs.file-changes.outputs.checkall=='true' && ((github.event_name=='pull_request_review' && github.event.review.state=='approved') || (github.event_name=='pull_request' && (github.event.pull_request.user.login=='sbryngelson' || github.event.pull_request.user.login=='wilfonba'))) }}
+if: ${{ github.repository == 'MFlowCode/MFC' && 
+         needs.file-changes.outputs.checkall == 'true' && 
+         ((github.event_name == 'pull_request_review' && github.event.review.state == 'approved') || 
+          (github.event_name == 'pull_request' && 
+           (github.event.pull_request.user.login == 'sbryngelson' || 
+            github.event.pull_request.user.login == 'wilfonba'))) }}
Suggestion importance[1-10]: 6

__

Why: The suggestion correctly points out that the PR's change to a single-line if condition harms readability and proposes reverting to a multi-line format, which is a valid improvement for maintainability.

Low
  • More

@sbryngelson sbryngelson merged commit 52c0aac into MFlowCode:master Aug 2, 2025
22 of 29 checks passed
Copy link

codecov bot commented Aug 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 43.67%. Comparing base (a1d1576) to head (2d1ed2e).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #973   +/-   ##
=======================================
  Coverage   43.67%   43.67%           
=======================================
  Files          70       70           
  Lines       19818    19818           
  Branches     2473     2473           
=======================================
  Hits         8655     8655           
  Misses       9644     9644           
  Partials     1519     1519           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sbryngelson sbryngelson deleted the ben-bench branch August 3, 2025 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

1 participant