╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ──╮ │src/web.zig│ ╰───────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │684 var any_repo = try rp.AnyRepo(repo_kind, .{}).open(io, allocator, source.localInitOpts()); │ │685 defer any_repo.deinit(io, allocator); │ │686 switch (any_repo) { │ │687 - inline else => |*repo| try evt.consume(.repo, repo_kind, repo.self_repo_opts, io, allocator, repo, evt.events_ref, &[_]evt.EventWithId{event}), │ │687 + inline else => |*repo| try evt.consume(std.meta.activeTag(host), .repo, repo_kind, repo.self_repo_opts, io, allocator, repo, evt.events_ref, &[_]evt.EventWithId{event}),│ │688 } │ │689 }, │ │690 } │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │727 ) !void { │ │728 const parts = commentBaseParts(base) orelse return respondRemoveNotFound(request); │ │729 if (parts.thread_kind != .patch or parts.comment_id != null) return respondRemoveNotFound(request);│ │730 - const remote = switch (host) { │ │731 - .remote => |remote| remote, │ │730 + const server = switch (host) { │ │731 + .server => |server| server, │ │732 .local => return respondRemoveNotFound(request), │ │733 }; │ │734 var author_arena = std.heap.ArenaAllocator.init(allocator); │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │742 const repo_id = evt.parseEventId(std.fs.path.basename(request_repo.source.path)) catch return respondRemoveNotFound(request);│ │743 var target_repo = try rp.Repo(.xit, .{}).open(io, allocator, request_repo.source.localInitOpts()); │ │744 defer target_repo.deinit(io, allocator); │ │745 - var admin_repo = try rp.Repo(.xit, evt.admin_repo_opts).open(io, allocator, .{ .path = remote.admin_repo_path }); │ │745 + var admin_repo = try rp.Repo(.xit, evt.admin_repo_opts).open(io, allocator, .{ .path = server.admin_repo_path }); │ │746 defer admin_repo.deinit(io, allocator); │ │747 const id = std.fmt.bytesToHex(parts.thread_id, .lower); │ │748 - const repos_dir = try std.fs.path.join(allocator, &.{ std.fs.path.dirname(remote.admin_repo_path) orelse ".", "repos" }); │ │748 + const repos_dir = try std.fs.path.join(allocator, &.{ std.fs.path.dirname(server.admin_repo_path) orelse ".", "repos" }); │ │749 defer allocator.free(repos_dir); │ │750 const fork_path = try fork.forkPath(allocator, repos_dir, &id); │ │751 defer allocator.free(fork_path); │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │772 ) !void { │ │773 const parts = commentBaseParts(base) orelse return respondRemoveNotFound(request); │ │774 if (parts.thread_kind != .patch or parts.comment_id != null) return respondRemoveNotFound(request);│ │775 - const remote = switch (host) { │ │776 - .remote => |remote| remote, │ │775 + const server = switch (host) { │ │776 + .server => |server| server, │ │777 .local => return respondRemoveNotFound(request), │ │778 }; │ │779 var author_arena = std.heap.ArenaAllocator.init(allocator); │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │784 defer request_repo.deinit(allocator); │ │785 var target_repo = try rp.Repo(.xit, .{}).open(io, allocator, request_repo.source.localInitOpts()); │ │786 defer target_repo.deinit(io, allocator); │ │787 - var admin_repo = try rp.Repo(.xit, evt.admin_repo_opts).open(io, allocator, .{ .path = remote.admin_repo_path });│ │787 + var admin_repo = try rp.Repo(.xit, evt.admin_repo_opts).open(io, allocator, .{ .path = server.admin_repo_path });│ │788 defer admin_repo.deinit(io, allocator); │ │789 │ │790 const id = std.fmt.bytesToHex(parts.thread_id, .lower); │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │791 - const repos_dir = try std.fs.path.join(allocator, &.{ std.fs.path.dirname(remote.admin_repo_path) orelse ".", "repos" });│ │791 + const repos_dir = try std.fs.path.join(allocator, &.{ std.fs.path.dirname(server.admin_repo_path) orelse ".", "repos" });│ │792 defer allocator.free(repos_dir); │ │793 pch.mergeAndRemoveFork(.{}, io, allocator, repos_dir, &admin_repo, &target_repo, .{ │ │794 .id = id, │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │870 var any_repo = try rp.AnyRepo(repo_kind, .{}).open(io, allocator, source.localInitOpts()); │ │871 defer any_repo.deinit(io, allocator); │ │872 switch (any_repo) { │ │873 - inline else => |*repo| event_id_hex = try evt.Comment.create(repo_kind, repo.self_repo_opts, io, allocator, repo, &thread_id_hex, &parent_id_hex, body, author), │ │873 + inline else => |*repo| event_id_hex = try evt.Comment.create(std.meta.activeTag(host), repo_kind, repo.self_repo_opts, io, allocator, repo, &thread_id_hex, &parent_id_hex, body, author),│ │874 } │ │875 }, │ │876 } │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1061 var any_repo = try rp.AnyRepo(repo_kind, .{}).open(io, allocator, source.localInitOpts()); │ │1062 defer any_repo.deinit(io, allocator); │ │1063 switch (any_repo) { │ │1064 - inline else => |*repo| _ = evt.Attachment.create(repo_kind, repo.self_repo_opts, io, allocator, repo, &parent_id_hex, blob, author) catch |err| switch (err) { │ │1064 + inline else => |*repo| _ = evt.Attachment.create(std.meta.activeTag(host), repo_kind, repo.self_repo_opts, io, allocator, repo, &parent_id_hex, blob, author) catch |err| switch (err) {│ │1065 error.ParentNotFound => return respondAttachmentParentNotFound(request), │ │1066 else => return err, │ │1067 }, │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1113 var any_repo = try rp.AnyRepo(repo_kind, .{}).open(io, allocator, source.localInitOpts()); │ │1114 defer any_repo.deinit(io, allocator); │ │1115 switch (any_repo) { │ │1116 - inline else => |*repo| try evt.Comment.update(repo_kind, repo.self_repo_opts, io, allocator, repo, &thread_id, &comment_id, body, author), │ │1116 + inline else => |*repo| try evt.Comment.update(std.meta.activeTag(host), repo_kind, repo.self_repo_opts, io, allocator, repo, &thread_id, &comment_id, body, author),│ │1117 } │ │1118 }, │ │1119 } │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1199 var any_repo = try rp.AnyRepo(repo_kind, .{}).open(io, allocator, source.localInitOpts()); │ │1200 defer any_repo.deinit(io, allocator); │ │1201 switch (any_repo) { │ │1202 - inline else => |*repo| { │ │1203 - try Event.update(repo_kind, repo.self_repo_opts, io, allocator, repo, id, update, author); │ │1204 - if (comptime Event == evt.Patch and repo_kind == .xit) { │ │1205 - if (host == .remote) pch.refreshMergeability(repo.self_repo_opts, io, allocator, repo, id.*); │ │1206 - } │ │1207 - }, │ │1202 + inline else => |*repo| try Event.update(std.meta.activeTag(host), repo_kind, repo.self_repo_opts, io, allocator, repo, id, update, author),│ │1203 } │ │1204 }, │ │1205 } │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯