// Gitea Actions CI failure alert
// Receives: { text: "CI FAILED: repo @ branch — url" }
// Posted by the notify-failure job in each repo's lint.yml
var msg = data.text || data.body || '';
var lines = ['🔴 ' + msg];
var htmlParts = ['🔴 CI Failure
' + msg.replace(/—\s*(https?:\/\/\S+)/, '— View Run')];
result = { version: 'v2', plain: lines.join('\n'), html: htmlParts.join('
'), msgtype: 'm.notice' };