╭──────────╮ │← previous│ ╰──────────╯ ╭ changed ──╮ │src/web.zig│ ╰───────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1359 }; │ │1360 const request_repo = (try requestRepoSource(io, allocator, host, parts.repo_base)) orelse return respondRemoveNotFound(request);│ │1361 defer request_repo.deinit(allocator); │ │1362 + if (!try request_repo.source.hasBranch(io, allocator, target_branch)) { │ │1363 + const form_location = try std.fmt.allocPrint(allocator, "{s}/edit", .{base}); │ │1364 + defer allocator.free(form_location); │ │1365 + try request.respond("", .{ .status = .see_other, .extra_headers = &.{.{ .name = "location", .value = form_location }} }); │ │1366 + return; │ │1367 + } │ │1368 const repo_id = evt.parseEventId(std.fs.path.basename(request_repo.source.path)) catch return respondRemoveNotFound(request); │ │1369 var admin_repo = try rp.Repo(.xit, evt.admin_repo_opts).open(io, allocator, .{ .path = remote.admin_repo_path }); │ │1370 defer admin_repo.deinit(io, allocator); │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────╮ │1380 .title = title, │ │1381 .tags = tags, │ │1382 .description = description, │ │1383 + .target_branch = target_branch, │ │1384 .author = author, │ │1385 .timestamp = @intCast(std.Io.Timestamp.now(io, .real).toSeconds()),│ │1386 })) { │ ╰─────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │1408 .title = title, │ │1409 .tags = tags, │ │1410 .description = description, │ │1411 + .target_branch = target_branch, │ │1412 } }, author), │ │1413 .discuss => updateDiscussion(io, allocator, host, parts.repo_base, &parts.thread_id, title, tags, description, author),│ │1414 else => unreachable, │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯