╭ changed ────╮ │src/event.zig│ ╰─────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭───────────────────────────────────────────────────────────╮ │ 8 │ │ 9 pub const User = @import("event/User.zig"); │ │10 pub const Repo = @import("event/Repo.zig"); │ │11 +pub const Fork = @import("event/Fork.zig"); │ │12 pub const Issue = @import("event/Issue.zig"); │ │13 pub const Discussion = @import("event/Discussion.zig");│ │14 pub const Comment = @import("event/Comment.zig"); │ ╰───────────────────────────────────────────────────────────╯ ╭────────────────────────────────╮ │51 pub const EventKind = enum {│ │52 user, │ │53 repo, │ │54 + fork, │ │55 issue, │ │56 discuss, │ │57 comment, │ ╰────────────────────────────────╯ ╭────────────────────────────────────────╮ │70 pub const Event = union(EventKind) {│ │71 user: ?User, │ │72 repo: ?Repo, │ │73 + fork: ?Fork, │ │74 issue: ?Issue, │ │75 discuss: ?Discussion, │ │76 comment: ?Comment, │ ╰────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │151 .repo => .{ │ │152 .repo = if (json_event.data) |value| │ │153 try std.json.parseFromValueLeaky(Repo, arena.allocator(), value, .{ .ignore_unknown_fields = true })│ │154 + else │ │155 + null, │ │156 + }, │ │157 + .fork => .{ │ │158 + .fork = if (json_event.data) |value| │ │159 + try std.json.parseFromValueLeaky(Fork, arena.allocator(), value, .{ .ignore_unknown_fields = true })│ │160 else │ │161 null, │ │162 }, │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────╮ │237 const event: Event = switch (kind) { │ │238 .user => .{ .user = null }, │ │239 .repo => .{ .repo = null }, │ │240 + .fork => .{ .fork = null }, │ │241 .issue => .{ .issue = null }, │ │242 .discuss => .{ .discuss = null },│ │243 .comment => .{ .comment = null },│ ╰──────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │918 const record_maybe: ?Repo.Record = if (event_maybe) |event| .{ .event = event, .created_order = event_order } else null;│ │919 try Repo.consume(DB, repo_opts.hash, haxy_moment, &current_event_id, record_maybe, &arena, &repo_event_oid); │ │920 }, │ │921 + .fork => |event_maybe| { │ │922 + const record_maybe: ?Fork.Record = if (event_maybe) |event| .{ .event = event, .created_order = event_order } else null;│ │923 + try Fork.consume(DB, repo_opts.hash, haxy_moment, &current_event_id, record_maybe, &arena, &repo_event_oid); │ │924 + }, │ │925 .issue => |event_maybe| { │ │926 const record_maybe: ?Issue.Record = if (event_maybe) |event| .{ │ │927 .event = event, │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯