fix: Repo-only-Projekte bekommen keine Subdomain vom Webhook; WOID numerisch

- Webhook: Subdomain-Fallback auf Repo-Name nur noch bei aktivierter Preview,
  Projekte ohne Website behalten leere Subdomain/previewUrl
- generateNextWoid: numerisches Maximum statt String-Sortierung (gemischt
  5-/6-stellige WOIDs im Bestand)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-11 18:14:41 +00:00
parent d4bd510dcd
commit 1c1826d25d
2 changed files with 11 additions and 7 deletions

View File

@@ -58,7 +58,9 @@ router.post('/gitea', async (req, res) => {
const previewConfigFile = await fetchPreviewConfig(repoFullName, branch)
const previewConfig = previewConfigFile || defaultPreviewConfig(repoFullName)
const hasPreview = Boolean(previewConfigFile?.enabled !== false && previewConfigFile)
const subdomain = previewConfig.subdomain || repoFullName.split('/').pop()
// Nur Projekte mit aktivierter Preview bekommen eine Subdomain zugewiesen -
// Repo-only-Projekte (enabled:false, keine Subdomain) bleiben ohne Website.
const subdomain = hasPreview ? previewConfig.subdomain || repoFullName.split('/').pop() : ''
const previewUrl = subdomain ? buildPreviewUrl(subdomain) : ''
let deployResult = { deployed: false, skipped: true }