diff --git a/CHANGELOG.md b/CHANGELOG.md index 1b5933ca2a..73f35be5d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ - **core:** Fix substitute handling of substring keys ([#6561](https://github.com/ScoopInstaller/Scoop/issues/6561)) - **core:** Check `$deprecated_dir` exists before accessing it ([#6574](https://github.com/ScoopInstaller/Scoop/issues/6574)) - **checkver:** Remove redundant always-true condition in GitHub checkver logic ([#6571](https://github.com/ScoopInstaller/Scoop/issues/6571)) +- **auto-pr** Rebase before pushing in `auto-pr.ps1` to prevent push conflicts ([#6624](https://github.com/ScoopInstaller/Scoop/issues/6624)) ### Code Refactoring diff --git a/bin/auto-pr.ps1 b/bin/auto-pr.ps1 index 766e49764d..760c231392 100644 --- a/bin/auto-pr.ps1 +++ b/bin/auto-pr.ps1 @@ -212,6 +212,8 @@ hub diff --name-only | ForEach-Object { } if ($Push) { + Write-Host 'Rebasing local branch before push ...' -ForegroundColor DarkCyan + execute "hub pull --rebase origin $OriginBranch" Write-Host 'Pushing updates ...' -ForegroundColor DarkCyan execute "hub push origin $OriginBranch" } else {