╭ changed ──╮ │src/web.zig│ ╰───────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │414 }; │ │415 } │ │416 │ │417 -fn requiredTitleFeedback(kind: evt.EventKind, title: []const u8, tags: []const u8, description: []const u8, target_branch: []const u8, source_branch: ?[]const u8) ui.Session.FormFeedback { │ │417 +fn requiredTitleFeedback(kind: evt.EventKind, title: []const u8, labels: []const u8, description: []const u8, target_branch: []const u8, source_branch: ?[]const u8) ui.Session.FormFeedback {│ │418 return switch (kind) { │ │419 .issue => .{ .issue = .{ .failure = .required_title, .fields = .{ │ │420 .title = title, │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │421 - .tags = tags, │ │421 + .labels = labels, │ │422 .description = description, │ │423 } } }, │ │424 - .patch => patchFeedback(.required_title, title, tags, description, target_branch, source_branch), │ │424 + .patch => patchFeedback(.required_title, title, labels, description, target_branch, source_branch),│ │425 .discuss => .{ .discussion = .{ .failure = .required_title, .fields = .{ │ │426 .title = title, │ │427 - .tags = tags, │ │427 + .labels = labels, │ │428 .description = description, │ │429 } } }, │ │430 else => unreachable, │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │431 }; │ │432 } │ │433 │ │434 -fn patchFeedback(failure: ui.Session.FormFeedback.PatchFailure, title: []const u8, tags: []const u8, description: []const u8, target_branch: []const u8, source_branch: ?[]const u8) ui.Session.FormFeedback { │ │434 +fn patchFeedback(failure: ui.Session.FormFeedback.PatchFailure, title: []const u8, labels: []const u8, description: []const u8, target_branch: []const u8, source_branch: ?[]const u8) ui.Session.FormFeedback {│ │435 return .{ .patch = .{ .failure = failure, .fields = .{ │ │436 .title = title, │ │437 - .tags = tags, │ │437 + .labels = labels, │ │438 .description = description, │ │439 .target_branch = target_branch, │ │440 .source_branch = source_branch orelse "", │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │642 │ │643 const title = (try parseFormField(allocator, body, "title")) orelse try allocator.dupe(u8, ""); │ │644 defer allocator.free(title); │ │645 - const tags = (try parseFormField(allocator, body, "tags")) orelse try allocator.dupe(u8, ""); │ │646 - defer allocator.free(tags); │ │645 + const labels = (try parseFormField(allocator, body, "labels")) orelse try allocator.dupe(u8, ""); │ │646 + defer allocator.free(labels); │ │647 const description_crlf = (try parseFormField(allocator, body, "description")) orelse try allocator.dupe(u8, "");│ │648 defer allocator.free(description_crlf); │ │649 // form submission normalizes textarea line breaks to CRLF; store plain │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────╮ │657 defer if (source_branch) |branch| allocator.free(branch); │ │658 │ │659 const valid = switch (kind) { │ │660 - .issue => evt.Issue.fieldsValid(title, tags), │ │661 - .patch => evt.Patch.fieldsValid(title, tags), │ │662 - .discuss => evt.Discussion.fieldsValid(title, tags), │ │660 + .issue => evt.Issue.fieldsValid(title, labels), │ │661 + .patch => evt.Patch.fieldsValid(title, labels), │ │662 + .discuss => evt.Discussion.fieldsValid(title, labels),│ │663 else => unreachable, │ │664 }; │ │665 if (!valid) { │ ╰───────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │672 const form_location = try std.fmt.allocPrint(allocator, "{s}/{s}/new", .{ base, list_name }); │ │673 defer allocator.free(form_location); │ │674 if (!evt.titleValid(title)) { │ │675 - return respondThreadFormFailure(request, allocator, host, form_location, requiredTitleFeedback(kind, title, tags, description, target_branch, source_branch)); │ │675 + return respondThreadFormFailure(request, allocator, host, form_location, requiredTitleFeedback(kind, title, labels, description, target_branch, source_branch));│ │676 } │ │677 try request.respond("", .{ │ │678 .status = .see_other, │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │704 if (!evt.Patch.branchValid(target_branch) or !try request_repo.source.hasBranch(io, allocator, target_branch)) { │ │705 const form_location = try std.fmt.allocPrint(allocator, "{s}/patches/new", .{base}); │ │706 defer allocator.free(form_location); │ │707 - return respondThreadFormFailure(request, allocator, host, form_location, patchFeedback(.invalid_target_branch, title, tags, description, target_branch, null)); │ │707 + return respondThreadFormFailure(request, allocator, host, form_location, patchFeedback(.invalid_target_branch, title, labels, description, target_branch, null));│ │708 } │ │709 const repo_id = evt.parseEventId(std.fs.path.basename(request_repo.source.path)) catch return respondRemoveNotFound(request); │ │710 var admin_repo = try rp.Repo(.xit, evt.admin_repo_opts).open(io, allocator, .{ .path = server.admin_repo_path }); │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────╮ │717 .repo_id = repo_id, │ │718 .title = title, │ │719 .description = description, │ │720 - .tags = tags, │ │720 + .labels = labels, │ │721 .target_branch = target_branch, │ │722 .author = author, │ │723 .timestamp = @intCast(std.Io.Timestamp.now(io, .real).toSeconds()),│ ╰────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │729 .timestamp = @intCast(std.Io.Timestamp.now(io, .real).toSeconds()), │ │730 .author = author, │ │731 .event = switch (kind) { │ │732 - .issue => .{ .issue = .{ .title = title, .description = description, .tags = tags } }, │ │733 - .patch => .{ .patch = .{ .title = title, .description = description, .tags = tags, .target_branch = target_branch, .source_branch = source_branch } }, │ │734 - .discuss => .{ .discuss = .{ .title = title, .description = description, .tags = tags } }, │ │732 + .issue => .{ .issue = .{ .title = title, .description = description, .labels = labels } }, │ │733 + .patch => .{ .patch = .{ .title = title, .description = description, .labels = labels, .target_branch = target_branch, .source_branch = source_branch } },│ │734 + .discuss => .{ .discuss = .{ .title = title, .description = description, .labels = labels } }, │ │735 else => unreachable, │ │736 }, │ │737 }; │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │751 const failure = ui.Session.FormFeedback.PatchFailure.fromError(err) orelse return err; │ │752 const form_location = try std.fmt.allocPrint(allocator, "{s}/patches/new", .{base}); │ │753 defer allocator.free(form_location); │ │754 - return respondThreadFormFailure(request, allocator, host, form_location, patchFeedback(failure, title, tags, description, target_branch, source_branch)); │ │754 + return respondThreadFormFailure(request, allocator, host, form_location, patchFeedback(failure, title, labels, description, target_branch, source_branch));│ │755 }; │ │756 }, │ │757 } │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭──────╮ │next →│ ╰──────╯