Built the goddamn project.

This commit is contained in:
Tomáš Musil 2024-07-04 15:13:59 +02:00
parent 4c101e89ae
commit d454e89334

7
dist/index.js vendored
View File

@ -231325,7 +231325,7 @@ try {
const { owner, repo } = ctx.repo; const { owner, repo } = ctx.repo;
const { const {
workflow, actor, payload, serverUrl, runNumber, ref, workflow, actor, payload, serverUrl, runNumber,
} = ctx; } = ctx;
const repoURL = `${serverUrl}/${owner}/${repo}`; const repoURL = `${serverUrl}/${owner}/${repo}`;
@ -231360,9 +231360,10 @@ try {
const userMention = status === 'success' ? actor : `<a href="https://matrix.to/#/@${actor}:${homeserver}">${actor}</a>`; const userMention = status === 'success' ? actor : `<a href="https://matrix.to/#/@${actor}:${homeserver}">${actor}</a>`;
const formattedMessage = ` const formattedMessage = `
<h4 style="color: ${statusOpts[status].color}">${statusOpts[status].status} ${workflow.name}</h4> <h4 style="color: ${statusOpts[status].color}">${statusOpts[status].status} ${workflow}</h4>
<p><strong>Repository</strong> <a href="${repoURL}">${owner}/${repo}</a><br> <p><strong>Repository</strong> <a href="${repoURL}">${owner}/${repo}</a><br>
<strong>Commit</strong> <a href="${payload.head_commit.url}">${payload.head_commit.id.substring(0, 7)}</a> ${payload.head_commit.message}<br> <strong>Commit</strong> <a href="${payload.head_commit.url}">${payload.head_commit.id.substring(0, 7)}</a> ${payload.head_commit.message}<br>
<strong>Ref</strong> ref<br>
<strong>Triggered by</strong> ${userMention}<br> <strong>Triggered by</strong> ${userMention}<br>
<strong>Run</strong> <a href="${runURL}">#${runNumber}</a><br> <strong>Run</strong> <a href="${runURL}">#${runNumber}</a><br>
${md.render(message)}`; ${md.render(message)}`;
@ -231375,7 +231376,7 @@ ${md.render(message)}`;
formatted_body: formattedMessage, formatted_body: formattedMessage,
}; };
if (status === 'success') content['m.mentions'] = { user_ids: [`@${actor}:${homeserver}`] }; if (status !== 'success') content['m.mentions'] = { user_ids: [`@${actor}:${homeserver}`] };
client.sendEvent(channel, 'm.room.message', content, '').then(() => { client.sendEvent(channel, 'm.room.message', content, '').then(() => {
// message sent successfully // message sent successfully