Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): Forgejo skipped jobs no longer keep a pull request watch pending #16668

MergedMnigos(GitHub profile, opens in a new tab)merged 6 commits intomain fromrefs/pull/16668/headmerged by juliusmarminge View on GitHub

Showing 2 changed files with 82 additions and 6 deletions.

x
0 of 2 viewed, 2 left
61 additions and 0 deletionspackages/source-control-forgejo/src/server/ForgejoSourceControlProvider.test.tsModified
View file
@@ -164,6 +164,67 @@
});
​
+it.effect("reads Forgejo jobs that did not run as finished checks", () =>
+ Effect.gen(function* () {
+ const provider = yield* ForgejoPullRequestProvider.make;
+ const read = provider.getChangeRequestChecks;
+ if (read === undefined) return yield* Effect.die("checks read missing");
+ const result = yield* read({
+ cwd: "/repo",
+ repository: "acme/web",
+ host: "forgejo.test",
+ number: 1,
+ });
+ assert.deepStrictEqual(
+ result.checks.map((check) => [check.name, check.status]),
+ [
+ ["deploy", "skipped"],
+ ["audit", "neutral"],
+ ["docs", "pending"],
+ ],
+ );
+ }).pipe(
+ Effect.provide(
+ Layer.mock(ForgejoCli.ForgejoCli)({
+ api: (input) => {
+ const status = (context: string, state: string) => ({
+ context,
+ status: state,