test
This commit is contained in:
5
lp/matrix/harbor-webhook.json
Normal file
5
lp/matrix/harbor-webhook.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"name": "Harbor Webhook",
|
||||
"webhookId": "harbor",
|
||||
"transformationFunction": "const repo = data.repository || {}; const resources = (data.event_data && data.event_data.resources) || []; let msg = ''; msg += '📦 Repository: ' + (repo.namespace || '') + '/' + (repo.name || '') + '\\n'; msg += '📝 Type: ' + (data.type || '') + '\\n'; msg += '👤 Operator: ' + (data.operator || '') + '\\n'; msg += '\\n'; msg += '💠 Resources:\\n'; resources.forEach((r, i) => { msg += '\\n'; msg += '🔹 Resource ' + (i + 1) + '\\n'; msg += '🏷 Tag: ' + (r.tag || '') + '\\n'; msg += '🆔 Digest: ' + (r.digest || '') + '\\n'; msg += '🌐 URL: ' + (r.resource_url || '') + '\\n'; }); result = { plain: msg, version: 'v2' };"
|
||||
}
|
||||
Reference in New Issue
Block a user