Skip to content

Commit 49597c7

Browse files
test(forgejo): answer the base branch read in the skipped-checks test (#23952)
Co-authored-by: Claude Opus 5.5 <[email protected]>
1 parent 656f3f4 commit 49597c7

1 file changed

Lines changed: 26 additions & 24 deletions

File tree

‎packages/source-control-forgejo/src/server/ForgejoSourceControlProvider.test.ts‎

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -308,30 +308,32 @@ it.effect("reads Forgejo jobs that did not run as finished checks", () =>
308308
target_url: null,
309309
updated_at: "2026-10-11T00:00:00Z",
310310
});
311-
const body = input.path.endsWith("pulls/1")
312-
? {
313-
number: 1,
314-
title: "Checks",
315-
body: "",
316-
html_url: "https://forgejo.test/acme/web/pulls/1",
317-
user: null,
318-
state: "open",
319-
merged: false,
320-
head: { ref: "feature", sha: "head", repo: null },
321-
base: { ref: "main", sha: "base", repo: null },
322-
created_at: "2026-10-11T00:00:00Z",
323-
updated_at: "2026-10-11T00:00:00Z",
324-
closed_at: null,
325-
merged_at: null,
326-
labels: [],
327-
}
328-
: input.path.endsWith("page=1")
329-
? [
330-
status("deploy", "skipped"),
331-
status("audit", "warning"),
332-
status("docs", "future-state"),
333-
]
334-
: [];
311+
const body = input.path.endsWith("branches/main")
312+
? {}
313+
: input.path.endsWith("pulls/1")
314+
? {
315+
number: 1,
316+
title: "Checks",
317+
body: "",
318+
html_url: "https://forgejo.test/acme/web/pulls/1",
319+
user: null,
320+
state: "open",
321+
merged: false,
322+
head: { ref: "feature", sha: "head", repo: null },
323+
base: { ref: "main", sha: "base", repo: null },
324+
created_at: "2026-10-11T00:00:00Z",
325+
updated_at: "2026-10-11T00:00:00Z",
326+
closed_at: null,
327+
merged_at: null,
328+
labels: [],
329+
}
330+
: input.path.endsWith("page=1")
331+
? [
332+
status("deploy", "skipped"),
333+
status("audit", "warning"),
334+
status("docs", "future-state"),
335+
]
336+
: [];
335337
return encodeJsonEffect(body).pipe(Effect.orDie, Effect.map(processOutput));
336338
},
337339
}),

0 commit comments

Comments
 (0)