Öffentliche Roadmap-Seite aus Gitea-Milestones
- GET /api/roadmap (public): Milestones des Setting roadmap_repo, 5-min-Cache, letzter guter Stand als Fallback bei Gitea-Ausfall - /roadmap: Gruppen In Arbeit / Geplant / Fertig, Fortschrittsbalken im Brand-Look, Ziel-Monat, Markdown-Beschreibungen; Nav-Link öffentlich - Setup-Seite: Roadmap-Repo konfigurierbar Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -24,6 +24,17 @@ export async function createIssue(repo, title, body) {
|
||||
return { number: issue.number, html_url: issue.html_url };
|
||||
}
|
||||
|
||||
/** Milestones eines Repos (für die Roadmap-Seite); Token optional bei öffentlichen Repos */
|
||||
export async function getMilestones(repo) {
|
||||
const res = await fetch(`${giteaUrl()}/api/v1/repos/${repo}/milestones?state=all&per_page=50`, {
|
||||
headers: config.giteaApiToken ? headers() : { Accept: 'application/json' },
|
||||
});
|
||||
if (!res.ok) {
|
||||
throw new Error(`Gitea getMilestones ${res.status}`);
|
||||
}
|
||||
return res.json();
|
||||
}
|
||||
|
||||
/** Datei (z. B. Screenshot) als Issue-Attachment hochladen */
|
||||
export async function uploadIssueAsset(repo, issueNumber, filename, buffer) {
|
||||
const form = new FormData();
|
||||
|
||||
Reference in New Issue
Block a user