╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ──────────╮ │src/event/Patch.zig│ ╰───────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │342 updated = try resolveFields(repo_kind, repo_opts, io, allocator, &arena, repo, id, record, resolve); │ │343 }, │ │344 } │ │345 - if (!fieldsValid(updated.title, updated.tags)) return error.InvalidFields; │ │345 + if (!fieldsValid(updated.title, updated.labels)) return error.InvalidFields; │ │346 │ │347 if (updated.source_branch != null and updated.revision == null) return @import("../patch.zig").writeBranchPatch(host_kind, repo_kind, repo_opts, io, allocator, repo, std.fmt.bytesToHex(id.*, .lower), updated, record.event, author);│ │348 try evt.consume(host_kind, .repo, repo_kind, repo_opts, io, allocator, repo, evt.events_ref, &.{.{ │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │367 const DB = evt.EventDB(repo_opts.hash); │ │368 var updated = live.event; │ │369 if (resolve.title) |title| updated.title = title; │ │370 - if (resolve.tags) |tags| updated.tags = tags; │ │370 + if (resolve.labels) |labels| updated.labels = labels; │ │371 │ │372 var event_db_maybe: ?evt.LocalEventDB(repo_opts.hash) = if (repo_kind == .git) try evt.LocalEventDB(repo_opts.hash).openReadOnly(io, allocator, repo.core.repo_dir) else null;│ │373 defer if (event_db_maybe) |*event_db| event_db.deinit(io, allocator); │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────╮ │433 return DB.SortedSet(.read_write).init(try statuses.putCursor(@tagName(status)));│ │434 } │ │435 │ │436 -fn removeFromTagSets( │ │436 +fn removeFromLabelSets( │ │437 comptime DB: type, │ │438 - tag_statuses: DB.SortedMap(.read_write), │ │439 - tags: []const u8, │ │438 + label_statuses: DB.SortedMap(.read_write), │ │439 + labels: []const u8, │ │440 status: StatusKind, │ │441 order_key: []const u8, │ │442 ) !void { │ ╰─────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────╮ │443 - var tag_iter = tagIterator(tags); │ │444 - while (tag_iter.next()) |tag| { │ │445 - if (tag.len == 0 or tag.len > tag_max_len) continue; │ │446 - var key_buffer: TagStatusKey = undefined; │ │447 - const key = try tagStatusKey(&key_buffer, tag, status); │ │448 - const set = try DB.SortedSet(.read_write).init(try tag_statuses.putCursor(key)); │ │443 + var label_iter = labelIterator(labels); │ │444 + while (label_iter.next()) |label| { │ │445 + if (label.len == 0 or label.len > label_max_len) continue; │ │446 + var key_buffer: LabelStatusKey = undefined; │ │447 + const key = try labelStatusKey(&key_buffer, label, status); │ │448 + const set = try DB.SortedSet(.read_write).init(try label_statuses.putCursor(key));│ │449 _ = try set.remove(order_key); │ │450 - if (0 == try set.count()) _ = try tag_statuses.remove(key); │ │450 + if (0 == try set.count()) _ = try label_statuses.remove(key); │ │451 } │ │452 } │ │453 │ ╰───────────────────────────────────────────────────────────────────────────────────────────────╯ ╭ changed ───╮ │src/fork.zig│ ╰────────────╯ ╭───────────────────────────────────────╮ │39 repo_id: [evt.event_id_size]u8,│ │40 title: []const u8, │ │41 description: []const u8, │ │42 - tags: []const u8, │ │42 + labels: []const u8, │ │43 target_branch: []const u8, │ │44 author: evt.CommitAuthor, │ │45 timestamp: u64, │ ╰───────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────╮ │53 admin_repo: *rp.Repo(.xit, evt.admin_repo_opts), │ │54 input: CreateInput, │ │55 ) ![]u8 { │ │56 - if (!evt.Patch.fieldsValid(input.title, input.tags)) return error.InvalidPatch; │ │56 + if (!evt.Patch.fieldsValid(input.title, input.labels)) return error.InvalidPatch; │ │57 if (!evt.Patch.branchValid(input.target_branch)) return error.InvalidTargetBranch;│ │58 │ │59 // get the fork id and path │ ╰──────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────╮ │185 .event = .{ .patch = .{ │ │186 .title = input.title, │ │187 .description = input.description, │ │188 - .tags = input.tags, │ │188 + .labels = input.labels, │ │189 .target_branch = input.target_branch,│ │190 } }, │ │191 }}); │ ╰──────────────────────────────────────────────────────╯ ╭ changed ────╮ │src/patch.zig│ ╰─────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────╮ │164 ) ![2]evt.EventWithId { │ │165 // validate the patch fields and branch names │ │166 const branch = patch.source_branch orelse return error.InvalidSourceBranch; │ │167 - if (!evt.Patch.fieldsValid(patch.title, patch.tags)) return error.InvalidFields; │ │167 + if (!evt.Patch.fieldsValid(patch.title, patch.labels)) return error.InvalidFields;│ │168 if (!evt.Patch.branchValid(branch)) return error.InvalidSourceBranch; │ │169 if (!evt.Patch.branchValid(patch.target_branch)) return error.InvalidTargetBranch;│ │170 │ ╰───────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────╮ │395 user_id: [evt.event_id_size]u8,│ │396 repo_id: [evt.event_id_size]u8,│ │397 title: []const u8, │ │398 - tags: []const u8, │ │398 + labels: []const u8, │ │399 description: []const u8, │ │400 target_branch: []const u8, │ │401 author: evt.CommitAuthor, │ ╰────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────╮ │959 input: EditDraftInput, │ │960 ) !bool { │ │961 // validate the submitted fields before opening repositories │ │962 - if (!evt.Patch.fieldsValid(input.title, input.tags)) return error.InvalidFields; │ │962 + if (!evt.Patch.fieldsValid(input.title, input.labels)) return error.InvalidFields;│ │963 if (!evt.Patch.branchValid(input.target_branch)) return error.InvalidTargetBranch;│ │964 const patch_id = try evt.parseEventId(&input.id); │ │965 var arena = std.heap.ArenaAllocator.init(allocator); │ ╰───────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯