merge-steward 0.8.7 → 0.8.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/github/shell-git.js +4 -1
- package/dist/reconciler.js +2 -0
- package/package.json +1 -1
package/dist/github/shell-git.js
CHANGED
|
@@ -78,7 +78,10 @@ export class ShellGitOperations {
|
|
|
78
78
|
mkdirSync(this.worktreeBase, { recursive: true });
|
|
79
79
|
await this.git(["worktree", "add", "-B", specName, wtPath, baseBranch]);
|
|
80
80
|
// Merge PR into spec branch inside the worktree.
|
|
81
|
-
|
|
81
|
+
// PR branches are always remote refs — use explicit origin/ prefix
|
|
82
|
+
// because git DWIM doesn't reliably resolve bare names in worktrees.
|
|
83
|
+
const mergeRef = prBranch.startsWith("origin/") ? prBranch : `origin/${prBranch}`;
|
|
84
|
+
const result = await this.gitIn(wtPath, ["merge", "--no-ff", mergeRef], { allowNonZero: true });
|
|
82
85
|
if (result.exitCode !== 0) {
|
|
83
86
|
const conflictFiles = parseConflicts(result.stderr);
|
|
84
87
|
// Lockfile-only conflicts can be auto-resolved by regenerating.
|
package/dist/reconciler.js
CHANGED
|
@@ -222,6 +222,8 @@ async function prepareEntry(ctx, entry, isHead, prevEntry) {
|
|
|
222
222
|
}
|
|
223
223
|
const specSha = result.sha ?? entry.headSha;
|
|
224
224
|
emit(ctx, entry, "spec_build_succeeded", { specBranch: specName, ...(prevEntry ? { dependsOn: prevEntry.id } : {}) });
|
|
225
|
+
// Push spec to remote so CI can access it.
|
|
226
|
+
await ctx.git.push(specName, true);
|
|
225
227
|
// Trigger CI on the spec branch.
|
|
226
228
|
const runId = await ctx.ci.triggerRun(specName, specSha);
|
|
227
229
|
emit(ctx, entry, "ci_triggered", { ciRunId: runId, specBranch: specName });
|