mirror of
https://github.com/RayLabsHQ/gitea-mirror.git
synced 2026-04-13 14:37:55 +03:00
feat: add target organization to Add Repository dialog (#202)
* feat: add target organization field to Add Repository dialog Allow users to specify a destination Gitea organization when adding a single repository, instead of relying solely on the default mirror strategy. The field is optional — when left empty, the existing strategy logic applies as before. Closes #200 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * docs: add screenshot of target organization field in Add Repository dialog Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -20,7 +20,7 @@ export const POST: APIRoute = async ({ request, locals }) => {
|
||||
const userId = authResult.userId;
|
||||
|
||||
const body: AddRepositoriesApiRequest = await request.json();
|
||||
const { owner, repo, force = false } = body;
|
||||
const { owner, repo, force = false, destinationOrg } = body;
|
||||
|
||||
if (!owner || !repo) {
|
||||
return new Response(
|
||||
@@ -122,7 +122,7 @@ export const POST: APIRoute = async ({ request, locals }) => {
|
||||
lastMirrored: existingRepo?.lastMirrored ?? null,
|
||||
errorMessage: existingRepo?.errorMessage ?? null,
|
||||
mirroredLocation: existingRepo?.mirroredLocation ?? "",
|
||||
destinationOrg: existingRepo?.destinationOrg ?? null,
|
||||
destinationOrg: destinationOrg?.trim() || existingRepo?.destinationOrg || null,
|
||||
updatedAt: repoData.updated_at
|
||||
? new Date(repoData.updated_at)
|
||||
: new Date(),
|
||||
|
||||
Reference in New Issue
Block a user