╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ──╮ │src/web.zig│ ╰───────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1415 var any_repo = try rp.AnyRepo(repo_kind, .{}).open(io, allocator, source.localInitOpts()); │ │1416 defer any_repo.deinit(io, allocator); │ │1417 switch (any_repo) { │ │1418 - inline else => |*repo| try evt.Discussion.update(std.meta.activeTag(host), repo_kind, repo.self_repo_opts, io, allocator, repo, id, title, tags, description, author), │ │1418 + inline else => |*repo| try evt.Discussion.update(std.meta.activeTag(host), repo_kind, repo.self_repo_opts, io, allocator, repo, id, title, labels, description, author),│ │1419 } │ │1420 }, │ │1421 } │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1494 │ │1495 const title = (try parseFormField(allocator, body, "title")) orelse try allocator.dupe(u8, ""); │ │1496 defer allocator.free(title); │ │1497 - const tags = (try parseFormField(allocator, body, "tags")) orelse try allocator.dupe(u8, ""); │ │1498 - defer allocator.free(tags); │ │1497 + const labels = (try parseFormField(allocator, body, "labels")) orelse try allocator.dupe(u8, ""); │ │1498 + defer allocator.free(labels); │ │1499 const description_crlf = (try parseFormField(allocator, body, "description")) orelse try allocator.dupe(u8, "");│ │1500 defer allocator.free(description_crlf); │ │1501 // form submission normalizes textarea line breaks to CRLF; store plain │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────╮ │1507 │ │1508 // invalid fields send the user back to the edit form │ │1509 const valid = switch (parts.thread_kind) { │ │1510 - .issue => evt.Issue.fieldsValid(title, tags), │ │1511 - .patch => evt.Patch.fieldsValid(title, tags), │ │1512 - .discuss => evt.Discussion.fieldsValid(title, tags), │ │1510 + .issue => evt.Issue.fieldsValid(title, labels), │ │1511 + .patch => evt.Patch.fieldsValid(title, labels), │ │1512 + .discuss => evt.Discussion.fieldsValid(title, labels),│ │1513 else => unreachable, │ │1514 }; │ │1515 if (!valid) { │ ╰────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1516 const form_location = try std.fmt.allocPrint(allocator, "{s}/edit", .{base}); │ │1517 defer allocator.free(form_location); │ │1518 if (!evt.titleValid(title)) { │ │1519 - return respondThreadFormFailure(request, allocator, host, form_location, requiredTitleFeedback(parts.thread_kind, title, tags, description, target_branch, null)); │ │1519 + return respondThreadFormFailure(request, allocator, host, form_location, requiredTitleFeedback(parts.thread_kind, title, labels, description, target_branch, null));│ │1520 } │ │1521 try request.respond("", .{ │ │1522 .status = .see_other, │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1537 if (!evt.Patch.branchValid(target_branch) or !try request_repo.source.hasBranch(io, allocator, target_branch)) { │ │1538 const form_location = try std.fmt.allocPrint(allocator, "{s}/edit", .{base}); │ │1539 defer allocator.free(form_location); │ │1540 - return respondThreadFormFailure(request, allocator, host, form_location, patchFeedback(.invalid_target_branch, title, tags, description, target_branch, null)); │ │1540 + return respondThreadFormFailure(request, allocator, host, form_location, patchFeedback(.invalid_target_branch, title, labels, description, target_branch, null));│ │1541 } │ │1542 const repo_id = evt.parseEventId(std.fs.path.basename(request_repo.source.path)) catch return respondRemoveNotFound(request); │ │1543 var admin_repo = try rp.Repo(.xit, evt.admin_repo_opts).open(io, allocator, .{ .path = server.admin_repo_path }); │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────╮ │1552 .user_id = user_id, │ │1553 .repo_id = repo_id, │ │1554 .title = title, │ │1555 - .tags = tags, │ │1555 + .labels = labels, │ │1556 .description = description, │ │1557 .target_branch = target_branch,│ │1558 .author = author, │ ╰─────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1578 (switch (parts.thread_kind) { │ │1579 .issue => updateThread(evt.Issue, io, allocator, host, parts.repo_base, &parts.thread_id, .{ .fields = .{│ │1580 .title = title, │ │1581 - .tags = tags, │ │1581 + .labels = labels, │ │1582 .description = description, │ │1583 } }, author), │ │1584 .patch => updateThread(evt.Patch, io, allocator, host, parts.repo_base, &parts.thread_id, .{ .fields = .{│ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────╮ │1585 .title = title, │ │1586 - .tags = tags, │ │1586 + .labels = labels, │ │1587 .description = description, │ │1588 .target_branch = target_branch,│ │1589 } }, author), │ ╰─────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1590 - .discuss => updateDiscussion(io, allocator, host, parts.repo_base, &parts.thread_id, title, tags, description, author), │ │1590 + .discuss => updateDiscussion(io, allocator, host, parts.repo_base, &parts.thread_id, title, labels, description, author),│ │1591 else => unreachable, │ │1592 }) catch |err| switch (err) { │ │1593 error.NotFound => { │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1602 const failure = ui.Session.FormFeedback.PatchFailure.fromError(err) orelse return err; │ │1603 const form_location = try std.fmt.allocPrint(allocator, "{s}/edit", .{base}); │ │1604 defer allocator.free(form_location); │ │1605 - return respondThreadFormFailure(request, allocator, host, form_location, patchFeedback(failure, title, tags, description, target_branch, null)); │ │1605 + return respondThreadFormFailure(request, allocator, host, form_location, patchFeedback(failure, title, labels, description, target_branch, null));│ │1606 }, │ │1607 }; │ │1608 │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯