╭ changed ─╮ │src/ui.zig│ ╰──────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────╮ │← previous│ ╰──────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────╮ │2398 }; │ │2399 │ │2400 pub const MembersFailure = enum { not_found, already_added }; │ │2401 + │ │2402 + pub const BranchesFailure = enum { │ │2403 + not_found, │ │2404 + already_added, │ │2405 + too_many, │ │2406 + too_long, │ │2407 │ │2408 + pub fn fromError(err: anyerror) ?BranchesFailure { │ │2409 + return switch (err) { │ │2410 + error.BranchProtected => .already_added, │ │2411 + error.TooManyProtectedBranches => .too_many, │ │2412 + else => null, │ │2413 + }; │ │2414 + } │ │2415 + }; │ │2416 + │ │2417 pub const AssignmentFailure = enum { not_found, not_an_email, already_assigned };│ │2418 │ │2419 pub const KeyFailure = enum { │ ╰───────────────────────────────────────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────╮ │2501 }, │ │2502 repo_members: struct { │ │2503 failure: MembersFailure, │ │2504 + name: []const u8, │ │2505 + }, │ │2506 + repo_branches: struct { │ │2507 + failure: BranchesFailure,│ │2508 name: []const u8, │ │2509 }, │ │2510 assignment: struct { │ ╰───────────────────────────────────────────╯