@@ -2453,11 +2453,8 @@ export class FolderRepositoryManager extends Disposable {
24532453 }
24542454
24552455 const isBrowser = ( vscode . env . appHost === 'vscode.dev' || vscode . env . appHost === 'github.dev' ) ;
2456- const hasNoConflicts = pullRequest . item . mergeable === PullRequestMergeability . Mergeable || pullRequest . item . mergeable === PullRequestMergeability . Behind ;
24572456
2458- // Use GraphQL API when PR is not checked out, in browser, or when there are no conflicts
2459- // The GraphQL API is simpler and more efficient for conflict-free updates
2460- if ( ! pullRequest . isActive || isBrowser || hasNoConflicts ) {
2457+ if ( ! pullRequest . isActive || isBrowser ) {
24612458 const conflictModel = await vscode . window . withProgress ( { location : vscode . ProgressLocation . Notification , title : vscode . l10n . t ( 'Finding conflicts...' ) } , ( ) => createConflictResolutionModel ( pullRequest ) ) ;
24622459 if ( conflictModel === undefined ) {
24632460 await vscode . window . showErrorMessage ( vscode . l10n . t ( 'Unable to resolved conflicts for this pull request. There are too many file changes.' ) , { modal : true , detail : isBrowser ? undefined : vscode . l10n . t ( 'Please check out the pull request to resolve conflicts.' ) } ) ;
@@ -2472,18 +2469,27 @@ export class FolderRepositoryManager extends Disposable {
24722469 }
24732470
24742471 if ( continueWithMerge ) {
2475- const updateSucceeded = await pullRequest . updateBranch ( conflictModel ) ;
2476- // If the PR is currently checked out and update succeeded via GraphQL (no conflicts), pull to sync local branch
2477- // When there are conflicts (REST API path), the update already pushes the changes, so no pull is needed
2478- if ( updateSucceeded && pullRequest . isActive && ! isBrowser && hasNoConflicts ) {
2479- await this . repository . pull ( ) ;
2480- }
2481- return updateSucceeded ;
2472+ return pullRequest . updateBranch ( conflictModel ) ;
24822473 } else {
24832474 return false ;
24842475 }
24852476 }
24862477
2478+ if ( pullRequest . item . mergeable !== PullRequestMergeability . Conflict ) {
2479+ const result = await vscode . window . withProgress (
2480+ { location : vscode . ProgressLocation . Notification , title : vscode . l10n . t ( 'Updating branch...' ) } ,
2481+ async ( ) => {
2482+ const success = await pullRequest . updateBranchWithGraphQL ( ) ;
2483+ if ( success && pullRequest . isActive ) {
2484+ await this . repository . pull ( ) ;
2485+ }
2486+ return success ;
2487+ }
2488+ ) ;
2489+ return result ;
2490+ }
2491+
2492+
24872493 if ( this . repository . state . workingTreeChanges . length > 0 || this . repository . state . indexChanges . length > 0 ) {
24882494 await vscode . window . showErrorMessage ( vscode . l10n . t ( 'The pull request branch cannot be updated when the there changed files in the working tree or index. Stash or commit all change and then try again.' ) , { modal : true } ) ;
24892495 return false ;
@@ -3063,7 +3069,7 @@ export const byRemoteName = (name: string): Predicate<GitHubRepository> => ({ re
30633069/**
30643070 * Unwraps lines that were wrapped for conventional commit message formatting (typically at 72 characters).
30653071 * Similar to GitHub's behavior when converting commit messages to PR descriptions.
3066- *
3072+ *
30673073 * Rules:
30683074 * - Preserves blank lines as paragraph breaks
30693075 * - Preserves fenced code blocks (```)
0 commit comments