v2.8.0 WIP: create/upload files + commit history + labels sync
FlowDeck CI / test (push) Failing after 4s
FlowDeck CI / docker (push) Has been skipped

- POST /api/gitea/projects/{owner}/{repo}/upload (binary upload)
- get_file_commits() in GiteaClient
- GET /api/gitea/projects/{owner}/{repo}/commits (per-file history)
- POST .../sync-labels (Gitea labels → FlowDeck tags)
- New file form + upload button in gitea_workspace.html topbar
This commit is contained in:
2026-07-13 22:33:47 -04:00
parent f25c8ebaf0
commit 6f15ad3ad4
9 changed files with 689 additions and 27 deletions
+11
View File
@@ -386,6 +386,17 @@ class GiteaClient:
for k in keys:
del self._cache[k]
async def get_file_commits(self, owner: str, repo: str, path: str) -> list[dict]:
"""Get recent commits affecting a specific file."""
url = f"{self.base}/api/v1/repos/{owner}/{repo}/commits"
params = {"path": path, "limit": 20}
headers = {"Authorization": f"token {self.token[0] if self.token else ''}", "Accept": "application/json"}
async with httpx.AsyncClient(timeout=self.timeout) as client:
resp = await client.get(url, params=params, headers=headers)
if resp.status_code == 200:
return resp.json()
return []
# ── singleton ──