╭ changed ─────────╮ │src/test/event.zig│ ╰──────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────╮ │← previous│ ╰──────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │890 } │ │891 { │ │892 json.clearRetainingCapacity(); │ │878 - const event = evt.EventWithId{ .id = events_to_consume[2].id, .event = .{ .issue = .{ │ │893 + const event = evt.EventWithId{ .id = events_to_consume[2].id, .author_email = author_email, .event = .{ .issue = .{│ │894 .title = third_issue.title, │ │895 .description = third_issue.description, │ │896 .tags = "enhancement roadmap", │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │963 │ │964 // we retitle one of the two the other branch is about to drop │ │965 { │ │951 - const event = evt.EventWithId{ .id = events_to_consume2[1].id, .event = .{ .issue = .{ │ │966 + const event = evt.EventWithId{ .id = events_to_consume2[1].id, .author_email = author_email, .event = .{ .issue = .{│ │967 .title = "Kept by the edit", │ │968 .description = edited_issue.description, │ │969 .tags = edited_issue.tags, │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │975 // the other branch deletes both │ │976 { │ │977 json.clearRetainingCapacity(); │ │963 - const event = evt.EventWithId{ .id = events_to_consume2[0].id, .event = .{ .issue = null } }; │ │978 + const event = evt.EventWithId{ .id = events_to_consume2[0].id, .author_email = author_email, .event = .{ .issue = null } }; │ │979 try std.json.Stringify.value(event, .{}, &json.writer); │ │980 _ = try repo.commitAtRef(io, allocator, .{ .parent_oids = &.{base_oid}, .message = json.written() }, null, other_events_ref);│ │981 } │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │982 { │ │983 json.clearRetainingCapacity(); │ │969 - const event = evt.EventWithId{ .id = events_to_consume2[1].id, .event = .{ .issue = null } }; │ │984 + const event = evt.EventWithId{ .id = events_to_consume2[1].id, .author_email = author_email, .event = .{ .issue = null } };│ │985 try std.json.Stringify.value(event, .{}, &json.writer); │ │986 _ = try repo.commitAtRef(io, allocator, .{ .message = json.written() }, null, other_events_ref); │ │987 } │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────╮ │1097 const events_to_consume = [_]evt.EventWithId{ │ │1098 .{ │ │1099 .id = std.fmt.bytesToHex(user_event_id, .lower),│ │1100 + .author_email = author_email, │ │1101 .event = .{ │ │1102 .user = .{ │ │1103 .name = "alice", │ ╰──────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────╮ │1110 // this event edits the previous one because it has the same id│ │1111 .{ │ │1112 .id = std.fmt.bytesToHex(user_event_id, .lower), │ │1113 + .author_email = author_email, │ │1114 .event = .{ │ │1115 .user = .{ │ │1116 .name = "alice", │ ╰─────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────╮ │1122 }, │ │1123 .{ │ │1124 .id = std.fmt.bytesToHex(repo_event_id, .lower),│ │1125 + .author_email = author_email, │ │1126 .event = .{ │ │1127 .repo = .{ │ │1128 .user_id = &user_event_id, │ ╰──────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────╮ │1184 const events_to_consume2 = [_]evt.EventWithId{ │ │1185 .{ │ │1186 .id = std.fmt.bytesToHex(repo_event_id, .lower),│ │1187 + .author_email = author_email, │ │1188 .event = .{ .repo = null }, │ │1189 }, │ │1190 }; │ ╰──────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────╮ │1219 const events_to_consume3 = [_]evt.EventWithId{ │ │1220 .{ │ │1221 .id = std.fmt.bytesToHex(user_event_id, .lower),│ │1222 + .author_email = author_email, │ │1223 .event = .{ .user = null }, │ │1224 }, │ │1225 }; │ ╰──────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1298 // one user, then four repos, each with its own creation timestamp (user@100, │ │1299 // repos@101..104) │ │1300 const events = [_]evt.EventWithId{ │ │1281 - .{ .id = std.fmt.bytesToHex(user_id, .lower), .timestamp = 100, .event = .{ .user = .{ .name = "alice", .display_name = "Alice", .email = "alice@example.test", .password_hash = pw } } }, │ │1282 - .{ .id = std.fmt.bytesToHex(repo_ids[0], .lower), .timestamp = 101, .event = .{ .repo = .{ .user_id = &user_id, .name = "repo0", .description = "d0" } } }, │ │1283 - .{ .id = std.fmt.bytesToHex(repo_ids[1], .lower), .timestamp = 102, .event = .{ .repo = .{ .user_id = &user_id, .name = "repo1", .description = "d1" } } }, │ │1284 - .{ .id = std.fmt.bytesToHex(repo_ids[2], .lower), .timestamp = 103, .event = .{ .repo = .{ .user_id = &user_id, .name = "repo2", .description = "d2" } } }, │ │1285 - .{ .id = std.fmt.bytesToHex(repo_ids[3], .lower), .timestamp = 104, .event = .{ .repo = .{ .user_id = &user_id, .name = "repo3", .description = "d3" } } }, │ │1301 + .{ .id = std.fmt.bytesToHex(user_id, .lower), .author_email = author_email, .timestamp = 100, .event = .{ .user = .{ .name = "alice", .display_name = "Alice", .email = "alice@example.test", .password_hash = pw } } },│ │1302 + .{ .id = std.fmt.bytesToHex(repo_ids[0], .lower), .author_email = author_email, .timestamp = 101, .event = .{ .repo = .{ .user_id = &user_id, .name = "repo0", .description = "d0" } } }, │ │1303 + .{ .id = std.fmt.bytesToHex(repo_ids[1], .lower), .author_email = author_email, .timestamp = 102, .event = .{ .repo = .{ .user_id = &user_id, .name = "repo1", .description = "d1" } } }, │ │1304 + .{ .id = std.fmt.bytesToHex(repo_ids[2], .lower), .author_email = author_email, .timestamp = 103, .event = .{ .repo = .{ .user_id = &user_id, .name = "repo2", .description = "d2" } } }, │ │1305 + .{ .id = std.fmt.bytesToHex(repo_ids[3], .lower), .author_email = author_email, .timestamp = 104, .event = .{ .repo = .{ .user_id = &user_id, .name = "repo3", .description = "d3" } } }, │ │1306 }; │ │1307 try evt.consume(.xit, repo_opts, io, allocator, &repo, evt.events_ref, &events); │ │1308 │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯