mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 19:01:39 -04:00
* GET /api/repos/<id>/log: the checked out branch's commits, newest first, a page at a time, with the total. The repo page has a Files | History toggle (the tree is only listed for Files). * GET /api/repos/<id>/archive.zip: `git archive HEAD` streamed to the browser; the file name is reduced to safe characters. Everything is read from the database before the response starts, because the request's session closes once a streamed response begins. * repository.submodules (default off): submodules are checked out with the repo's mode and the same git restrictions, and removed when the option is turned off. A submodule that cannot be downloaded (e.g. an ssh URL) does not stop the repo from updating; the download is retried with the submodule's error. * The README speed test bound is loose enough for a busy machine. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
31 lines
743 B
Python
31 lines
743 B
Python
from dataclasses import dataclass, field
|
|
from typing import Optional, List
|
|
|
|
|
|
@dataclass
|
|
class RepoCreateRequest:
|
|
url: str
|
|
tag_name: Optional[str] = None
|
|
frequency: Optional[int] = None
|
|
mode: Optional[str] = None
|
|
branch: Optional[str] = None
|
|
name: Optional[str] = None
|
|
description: Optional[str] = None
|
|
submodules: bool = False
|
|
|
|
|
|
@dataclass
|
|
class RepoSearchRequest:
|
|
search_str: Optional[str] = None
|
|
tag_names: List[str] = field(default_factory=list)
|
|
limit: int = 20
|
|
offset: int = 0
|
|
|
|
|
|
@dataclass
|
|
class RepoUpdateRequest:
|
|
description: Optional[str] = None
|
|
frequency: Optional[int] = None
|
|
mode: Optional[str] = None
|
|
branch: Optional[str] = None
|
|
submodules: Optional[bool] = None
|