Skip to content

Add basic rebase PR behaviour#5376

Merged
premun merged 10 commits intodotnet:mainfrom
premun:prvysoky/rebase-prs
Oct 17, 2025
Merged

Add basic rebase PR behaviour#5376
premun merged 10 commits intodotnet:mainfrom
premun:prvysoky/rebase-prs

Conversation

@premun
Copy link
Copy Markdown
Member

@premun premun commented Oct 15, 2025

When a feature flag is set for a subscription and a conflict is detected, drops a comment asking user to resolve the conflict locally.

Example commit: maestro-auth-test/dotnet#203 (comment)

#5313

When a feature flag is set for a subscription and a conflict is detected, drops a comment asking user to resolve the conflict locally

dotnet#5313
Copilot AI review requested due to automatic review settings October 15, 2025 06:58
Copy link
Copy Markdown
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 adds basic rebase pull request behavior for dependency flow operations. When a feature flag is enabled for a subscription and conflicts are detected during code flow, the system now requests manual conflict resolution instead of allowing conflicted PRs to proceed automatically.

Key changes:

  • Implements rebase strategy feature flag support for subscriptions
  • Adds manual conflict resolution workflow with helpful user guidance
  • Refactors pull request creation/update logic to handle conflict scenarios better

Reviewed Changes

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

Show a summary per file
File Description
PullRequestUpdater.cs Core logic for rebase strategy implementation, conflict detection, and manual resolution workflow
PullRequestCommentBuilder.cs New comment templates for manual conflict resolution guidance and improved notification handling
PullRequestCommenter.cs Minor formatting improvements for help text and comment processing
NonBatchedPullRequestUpdater.cs Constructor updated to inject feature flag service dependency
BatchedPullRequestUpdater.cs Constructor updated to inject feature flag service dependency
UpdaterTests.cs Test setup enhanced with feature flag service mock
GitRepoUrlUtils.cs Improved error handling and fallback logic for repository URL parsing
ScenarioTests_CodeFlowConflicts.cs Test data simplified for conflict detection scenarios
Comments suppressed due to low confidence (1)

src/ProductConstructionService/ProductConstructionService.DependencyFlow/PullRequestCommentBuilder.cs:1

  • [nitpick] This fallback logic for parsing repository names is complex and hard to understand. Consider extracting this into a separate method with a descriptive name like ExtractRepoNameFromUriAsFallback and add a comment explaining the logic.
// Licensed to the .NET Foundation under one or more agreements.

@premun premun marked this pull request as draft October 15, 2025 07:03
@premun premun marked this pull request as ready for review October 15, 2025 08:49
@premun premun requested review from adamzip and dkurepa October 15, 2025 08:49
Comment thread src/Maestro/Maestro.Common/GitRepoUrlUtils.cs Outdated
Copy link
Copy Markdown
Contributor

@adamzip adamzip left a comment

Choose a reason for hiding this comment

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

Some questions and also a few nits, feel free to implement them or discard them

Comment thread src/Maestro/Maestro.Common/GitRepoUrlUtils.cs
Comment thread src/Maestro/Maestro.Common/GitRepoUrlUtils.cs
@premun premun requested a review from adamzip October 16, 2025 16:21
@premun premun merged commit b50d8a7 into dotnet:main Oct 17, 2025
8 of 9 checks passed
@premun premun deleted the prvysoky/rebase-prs branch October 17, 2025 13:04
premun added a commit to premun/arcade-services that referenced this pull request Nov 10, 2025
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.

4 participants