╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ───╮ │src/fork.zig│ ╰────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │410 - const posted_patch = (evt.Patch.readById(evt.EventDB(repo_opts.hash), repo_opts.hash, target_update_moment, &update_arena, &patch_id) catch return) orelse return; │ │411 - if (posted_patch.removed) return; │ │410 + const published_patch = (evt.Patch.readById(evt.EventDB(repo_opts.hash), repo_opts.hash, target_update_moment, &update_arena, &patch_id) catch return) orelse return;│ │411 + if (published_patch.removed) return; │ │412 const fork_update_moment = evt.currentMoment(repo_opts, fork_repo) catch return; │ │413 const revision = (evt.PatchRev.readById(evt.EventDB(repo_opts.hash), repo_opts.hash, fork_update_moment, &update_arena, &revision_id) catch return) orelse return; │ │414 if (revision.removed) return; │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────╮ │415 const selected = evt.Patch.Revision.fromRecord(revision_id, revision); │ │416 - if (posted_patch.event.revision) |current| { │ │416 + if (published_patch.event.revision) |current| { │ │417 if (evt.fieldEqual(evt.Patch.Revision, current, selected)) return; │ │418 } │ │419 - var patch = posted_patch.event; │ │419 + var patch = published_patch.event; │ │420 patch.revision = selected; │ │421 evt.consume(.repo, .xit, repo_opts, io, allocator, target_repo, evt.events_ref, &.{.{│ │422 .id = id.*, │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │424 .author = author, │ │425 .event = .{ .patch = patch }, │ │426 }}) catch |update_err| { │ │427 - serve_common.logError(io, error_writer, "failed to update posted patch {s}: {s}\n", .{ id, @errorName(update_err) }); │ │427 + serve_common.logError(io, error_writer, "failed to update published patch {s}: {s}\n", .{ id, @errorName(update_err) });│ │428 }; │ │429 } │ │430 } │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ────╮ │src/patch.zig│ ╰─────────────╯ ╭─────────────────────────────────────────────────────╮ │ 9 const fork = @import("fork.zig"); │ │10 const serve_common = @import("serve_common.zig");│ │11 │ │12 -pub const PostInput = struct { │ │12 +pub const PublishInput = struct { │ │13 id: [evt.event_id_size * 2]u8, │ │14 user_id: [evt.event_id_size]u8, │ │15 repo_id: [evt.event_id_size]u8, │ ╰─────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────╮ │26 timestamp: u64, │ │27 }; │ │28 │ │29 -pub fn post( │ │29 +pub fn publish( │ │30 comptime repo_opts: rp.RepoOpts(.xit),│ │31 io: std.Io, │ │32 allocator: std.mem.Allocator, │ ╰──────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────╮ │33 admin_repo: *rp.Repo(.xit, evt.admin_repo_opts), │ │34 target_repo: *rp.Repo(.xit, repo_opts), │ │35 path: []const u8, │ │36 - input: PostInput, │ │36 + input: PublishInput, │ │37 ) !void { │ │38 const patch_id = try evt.parseEventId(&input.id); │ │39 var arena = std.heap.ArenaAllocator.init(allocator);│ ╰────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │92 } │ │93 │ │94 if (fork_record.event.stage == .draft) { │ │95 - var posted = fork_record.event; │ │96 - posted.stage = .posted; │ │95 + var published = fork_record.event; │ │96 + published.stage = .publish; │ │97 try evt.consume(.admin, .xit, evt.admin_repo_opts, io, allocator, admin_repo, evt.events_ref, &.{.{│ │98 .id = input.id, │ │99 .timestamp = input.timestamp, │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────╮ │100 .author = input.author, │ │101 - .event = .{ .fork = posted }, │ │101 + .event = .{ .fork = published },│ │102 }}); │ │103 } │ │104 } │ ╰─────────────────────────────────────────────────╯ ╭ changed ─────────╮ │src/test/event.zig│ ╰──────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │152 .event = .{ │ │153 .issue = .{ │ │154 .title = "Double clicking causes the form to submit twice", │ │155 - .description = "When I double click the post button I see duplicate posts.", │ │155 + .description = "When I double click the submit button I see duplicate submissions.",│ │156 .tags = "bug priority-high ui", │ │157 }, │ │158 }, │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ───────────────╮ │src/test/event/patch.zig│ ╰────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────╮ │648 try std.testing.expectError(error.NotFound, evt.currentMoment(repo_opts, &target));│ │649 │ │650 // │ │651 - // post the metadata and revision pointer │ │651 + // publish the metadata and revision pointer │ │652 // │ │653 │ │654 - try pch.post(repo_opts, io, allocator, &admin, &target, draft_path, .{ │ │654 + try pch.publish(repo_opts, io, allocator, &admin, &target, draft_path, .{ │ │655 .id = patch_id_hex, │ │656 .user_id = user_id, │ │657 .repo_id = repo_id, │ ╰────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯