Skip to content

Refactor and fix a bug with meaningful changes#5321

Merged
adamzip merged 7 commits into
dotnet:mainfrom
adamzip:improve-meaningful-changes-analyzer
Oct 1, 2025
Merged

Refactor and fix a bug with meaningful changes#5321
adamzip merged 7 commits into
dotnet:mainfrom
adamzip:improve-meaningful-changes-analyzer

Conversation

@adamzip

@adamzip adamzip commented Sep 30, 2025

Copy link
Copy Markdown
Contributor

#5299 (comment)

Repro'd PR (though there's not much to see, except that it was created): maestro-auth-test/dotnet#196

@adamzip adamzip force-pushed the improve-meaningful-changes-analyzer branch from 3f99eeb to 3fe073a Compare September 30, 2025 13:06

@premun premun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I like how you split chunks into named methods. It's much more readable now

Comment thread src/Microsoft.DotNet.Darc/DarcLib/VirtualMonoRepo/CodeflowChangeAnalyzer.cs Outdated
Comment thread src/Microsoft.DotNet.Darc/DarcLib/VirtualMonoRepo/CodeflowChangeAnalyzer.cs Outdated
Comment thread src/Microsoft.DotNet.Darc/DarcLib/VirtualMonoRepo/CodeflowChangeAnalyzer.cs Outdated
Comment thread src/Microsoft.DotNet.Darc/DarcLib/VirtualMonoRepo/CodeflowChangeAnalyzer.cs Outdated
Comment thread src/Microsoft.DotNet.Darc/DarcLib/VirtualMonoRepo/CodeflowChangeAnalyzer.cs Outdated
@adamzip adamzip force-pushed the improve-meaningful-changes-analyzer branch from 72e544a to f8e219b Compare October 1, 2025 09:28
@adamzip adamzip marked this pull request as ready for review October 1, 2025 09:28
Copilot AI review requested due to automatic review settings October 1, 2025 09:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 refactors the CodeflowChangeAnalyzer class to improve code organization and fix a bug in the test setup. The refactoring breaks down a large method into smaller, focused methods while maintaining the same functionality.

Key changes:

  • Extracted helper methods for getting common ancestor and changed files
  • Split the main analysis logic into separate methods for source changes and versioning changes
  • Fixed test setup to properly mock git diff output for versioning files

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/Microsoft.DotNet.Darc/DarcLib/VirtualMonoRepo/CodeflowChangeAnalyzer.cs Refactored main analysis method into smaller, focused methods with improved separation of concerns
test/Microsoft.DotNet.DarcLib.Tests/VirtualMonoRepo/CodeflowChangeAnalyzerTests.cs Added missing test setup for git diff output and removed unused test data

Comment thread src/Microsoft.DotNet.Darc/DarcLib/VirtualMonoRepo/CodeflowChangeAnalyzer.cs Outdated
Comment thread src/Microsoft.DotNet.Darc/DarcLib/VirtualMonoRepo/CodeflowChangeAnalyzer.cs Outdated
Comment thread src/Microsoft.DotNet.Darc/DarcLib/VirtualMonoRepo/CodeflowChangeAnalyzer.cs Outdated
Comment thread src/Microsoft.DotNet.Darc/DarcLib/ILocalGitClient.cs Outdated
Comment thread src/Microsoft.DotNet.Darc/DarcLib/ILocalGitClient.cs
Comment thread src/Microsoft.DotNet.Darc/DarcLib/ILocalGitClient.cs
Comment thread src/Microsoft.DotNet.Darc/DarcLib/LocalGitClient.cs Outdated
Comment thread src/Microsoft.DotNet.Darc/DarcLib/VirtualMonoRepo/CodeflowChangeAnalyzer.cs Outdated
premun
premun previously approved these changes Oct 1, 2025
@adamzip adamzip enabled auto-merge (squash) October 1, 2025 14:51
@adamzip adamzip merged commit e5b92fa into dotnet:main Oct 1, 2025
9 checks passed
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.

3 participants