Webhook: System-Commits legen kein Auto-Ticket an

Beim Anlegen mit Kunde (ohne Ticket) loeste der Commit der
.webklar-preview.json durch webklar-system ein zusaetzliches Ticket
"Website <name>" aus.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude Opus 5.5 committed 2026-10-04 13:32:51 +00:00
1 parent d878df96e0
commit 017a9c22f2
2 files changed
+13 -2

No files matched your search

+8
View File
@@ -223,6 +223,14 @@ test('Webhook des System-Kontos', async () => {
await webhook(pushPayload({ full_name: 'WEBklar/D-ner-Nation', sha: 'cafe0001', pusher: 'webklar-system' }))
assert.equal(aw.all('worksheets').length, before)
})
test('System-Commit an Projekt mit Kunde ohne Ticket legt kein Auto-Ticket an', async () => {
gitea.addRepo({ full_name: 'WEBklar/neu-mit-kunde' })
aw.insert('websiteProjects', { $id: 'p_sys', repoFullName: 'WEBklar/neu-mit-kunde', projectName: 'Neu', customerId: 'c1', ticketId: '' })
const before = aw.all('workorders').length
await webhook(pushPayload({ full_name: 'WEBklar/neu-mit-kunde', sha: 'cafe0002', pusher: 'webklar-system' }))
assert.equal(aw.all('workorders').length, before)
assert.equal(aw.get('websiteProjects', 'p_sys').ticketId, '')
})
test('Webhook wartet auf laufenden Umzug', async () => {
gitea.setTransferDelay(300)
const move = post('/api/admin/website-projects/p5/assign', { customerId: 'c1', ticketId: 't1' }, 'jwt-admin') // p5: JUSN/langsam