Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
ee08c23
feat(pull-requests): surface Gitea tracking summaries
kalvenschraut Sep 5, 2026
911169f
fix(pull-requests): limit Gitea tracking reads to displayed summaries
kalvenschraut Sep 5, 2026
10005f8
feat(pull-requests): open native Gitea revert pull requests
kalvenschraut Sep 5, 2026
dfd06ae
fix(pull-requests): keep incomplete Gitea access conservative
kalvenschraut Sep 5, 2026
d41838e
fix(pull-requests): apply available tracking summaries to filters
kalvenschraut Sep 5, 2026
010e69b
fix(source-control): recognize encoded Gitea repository URLs
kalvenschraut Sep 5, 2026
23da5a2
fix(pull-requests): preserve native Gitea review pagination
kalvenschraut Sep 5, 2026
a09a525
test(pull-requests): fill bounded Gitea comment pages
kalvenschraut Sep 5, 2026
de4d24c
feat(pull-requests): support native Gitea team reviewers
kalvenschraut Sep 5, 2026
bf2bdc7
fix(pull-requests): decode native Gitea team errors
kalvenschraut Sep 5, 2026
169019e
fix(pull-requests): preserve Gitea schema inference
kalvenschraut Sep 5, 2026
256fd6f
fix(pull-requests): retain typed Gitea team recovery
kalvenschraut Sep 5, 2026
93580c0
fix(pull-requests): match native Gitea warning status semantics
kalvenschraut Sep 5, 2026
c4fed16
fix(pull-requests): decode native Gitea reactions
kalvenschraut Sep 5, 2026
5a889ff
fix(pull-requests): accept empty Gitea reaction lists
kalvenschraut Sep 5, 2026
3c866b6
fix(pull-requests): paginate Gitea timelines correctly
kalvenschraut Sep 5, 2026
9276180
fix(pull-requests): tolerate Gitea timeline failures
kalvenschraut Sep 5, 2026
6b56ec6
fix(pull-requests): integrate Gitea tracking with bounded dependency …
kalvenschraut Sep 5, 2026
1e97a3c
fix(pull-requests): retain lifecycle fallbacks in the integrated stack
kalvenschraut Sep 5, 2026
32f0bff
fix(pull-requests): retain uncertain Gitea comment pagination
kalvenschraut Sep 5, 2026
6114cf3
fix(pull-requests): share the inline comment budget across reviews
kalvenschraut Sep 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions apps/server/src/pullRequest/GiteaConversation.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { describe, expect, it } from "@effect/vitest";
import * as Schema from "effect/Schema";

import {
editableCommentId,
Expand All @@ -23,10 +24,10 @@ describe("GiteaConversation", () => {

it("groups supported Gitea reactions and names the signed-in viewer separately", () => {
const rows: ReadonlyArray<typeof RawGiteaReaction.Type> = [
{ reaction: "+1", user: { login: "Reader" } },
{ reaction: "+1", user: { login: "teammate" } },
{ reaction: "heart", user: { login: "friend" } },
{ reaction: "party", user: { login: "ignored" } },
{ content: "+1", user: { login: "Reader" } },
{ content: "+1", user: { login: "teammate" } },
{ content: "heart", user: { login: "friend" } },
{ content: "party", user: { login: "ignored" } },
];

expect(reactionsForViewer(rows, "reader")).toEqual([
Expand All @@ -35,6 +36,19 @@ describe("GiteaConversation", () => {
]);
});

it("decodes and groups the native Gitea reaction response shape", () => {
const decodeReaction = Schema.decodeUnknownSync(RawGiteaReaction);
const row = decodeReaction({
content: "+1",
created_at: "2026-09-05T00:00:00Z",
user: { id: 7, login: "kalvens", full_name: "Kalven" },
});

expect(reactionsForViewer([row], "Kalvens")).toEqual([
{ content: "thumbs-up", count: 1, actors: [], viewerHasReacted: true },
]);
});

it("uses Gitea's reaction spelling on writes", () => {
expect(nativeReactionContent("thumbs-up")).toBe("+1");
expect(nativeReactionContent("heart")).toBe("heart");
Expand Down
4 changes: 2 additions & 2 deletions apps/server/src/pullRequest/GiteaConversation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const RawReactionUser = Schema.Struct({

/** The shape returned by Gitea's issue and issue-comment reaction endpoints. */
export const RawGiteaReaction = Schema.Struct({
reaction: Schema.optional(Schema.String),
content: Schema.String,
user: Schema.optional(Schema.NullOr(RawReactionUser)),
});

Expand Down Expand Up @@ -71,7 +71,7 @@ export function reactionsForViewer(
{ count: number; actors: Array<string>; viewerHasReacted: boolean }
>();
for (const row of rows) {
const content = row.reaction === undefined ? undefined : reactionContent.get(row.reaction);
const content = reactionContent.get(row.content);
if (content === undefined) continue;
const group = groups.get(content) ?? { count: 0, actors: [], viewerHasReacted: false };
group.count += 1;
Expand Down
Loading