Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
TÂCHES 2026-03-13 23:21:14 -06:00 committed by GitHub
parent bdb5defa3a
commit 1302e06f75

View file

@ -1057,11 +1057,12 @@ async function dispatchNextUnit(
if (hasMergeHead || hasSquashMsg) {
const unmerged = runGit(basePath, ["diff", "--name-only", "--diff-filter=U"], { allowFailure: true });
if (!unmerged || !unmerged.trim()) {
// fix-merge succeeded — finalize the commit if needed (squash case)
if (hasSquashMsg && !hasMergeHead) {
// fix-merge succeeded — finalize the commit if needed (squash or normal merge)
if (hasMergeHead || hasSquashMsg) {
try {
runGit(basePath, ["commit", "--no-edit"], { allowFailure: false });
ctx.ui.notify("Fix-merge session succeeded — finalized squash commit.", "info");
const mode = hasMergeHead ? "merge" : "squash commit";
ctx.ui.notify(`Fix-merge session succeeded — finalized ${mode}.`, "info");
} catch {
// Commit may already exist; non-fatal
}