feat: resolve conflicts in editable fork PRs

This commit is contained in:
lezi-fun committed 2026-08-14 11:52:38 +08:00
1 parent 3a0e0fb0b6
commit 0e914c6bc6
7 files changed
+127 -22

No files matched your search

+3 -2
View File
@@ -2,10 +2,11 @@ import assert from "node:assert/strict";
import fs from "node:fs/promises";
import test from "node:test";
test("pull_request_target checks out a PR worktree only for same-repository heads", async () => {
test("conflict repair checks out fork heads without persisting GitHub credentials", async () => {
const workflow = await fs.readFile(".github/workflows/review-reusable.yml", "utf8");
const caller = await fs.readFile(".github/workflows/review.yml", "utf8");
assert.match(workflow, /pull_head_repository == format\('\{0\}\/\{1\}'/);
assert.match(workflow, /inputs\.auto_resolve_conflicts == 'true'/);
assert.doesNotMatch(workflow, /pull_head_repository == format\('\{0\}\/\{1\}'/);
assert.doesNotMatch(workflow, /allow-unsafe-pr-checkout:\s*true/);
assert.match(workflow, /GHBOT_GOOSE_BINARY:\s*\$\{\{ runner\.temp \}\}\/goose\/bin\/goose/);
assert.match(caller, /pull_head_repository:\s*\$\{\{ github\.event\.pull_request\.head\.repo\.full_name \|\| '' \}\}/);