Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 3b5883db88 |
@ -21,9 +21,6 @@ inputs:
|
||||
description: "Job status. Should be bound to job.status. Default to success."
|
||||
required: false
|
||||
default: ${{ job.status }}
|
||||
messagetype:
|
||||
description: 'Type of Matrix message (e.g. `m.text` or `m.notice`)'
|
||||
default: 'm.notice'
|
||||
runs:
|
||||
using: 'node12'
|
||||
main: 'dist/index.js'
|
||||
|
||||
4
dist/index.js
vendored
4
dist/index.js
vendored
@ -231311,7 +231311,6 @@ try {
|
||||
const token = core.getInput('token');
|
||||
const message = core.getInput('message');
|
||||
const status = core.getInput('status');
|
||||
const messagetype = core.getInput('messagetype');
|
||||
|
||||
// Debug output
|
||||
core.info(`homeserver: ${homeserver}`);
|
||||
@ -231319,7 +231318,6 @@ try {
|
||||
core.info(`token: ${token}`);
|
||||
core.info(`message: ${message}`);
|
||||
core.info(`status: ${status}`);
|
||||
core.info(`messagetype: ${messagetype}`);
|
||||
|
||||
const ctx = github.context;
|
||||
|
||||
@ -231370,7 +231368,7 @@ ${md.render(message)}`;
|
||||
|
||||
// Send message
|
||||
const content = {
|
||||
msgtype: messagetype,
|
||||
msgtype: (status === 'success') ? 'm.notice' : 'm.text',
|
||||
format: 'org.matrix.custom.html',
|
||||
body: `${statusOpts[status].status} ${workflow} @${actor}`,
|
||||
formatted_body: formattedMessage,
|
||||
|
||||
4
index.js
4
index.js
@ -9,7 +9,6 @@ try {
|
||||
const token = core.getInput('token');
|
||||
const message = core.getInput('message');
|
||||
const status = core.getInput('status');
|
||||
const messagetype = core.getInput('messagetype');
|
||||
|
||||
// Debug output
|
||||
core.info(`homeserver: ${homeserver}`);
|
||||
@ -17,7 +16,6 @@ try {
|
||||
core.info(`token: ${token}`);
|
||||
core.info(`message: ${message}`);
|
||||
core.info(`status: ${status}`);
|
||||
core.info(`messagetype: ${messagetype}`);
|
||||
|
||||
const ctx = github.context;
|
||||
|
||||
@ -68,7 +66,7 @@ ${md.render(message)}`;
|
||||
|
||||
// Send message
|
||||
const content = {
|
||||
msgtype: messagetype,
|
||||
msgtype: (status === 'success') ? 'm.notice' : 'm.text',
|
||||
format: 'org.matrix.custom.html',
|
||||
body: `${statusOpts[status].status} ${workflow} @${actor}`,
|
||||
formatted_body: formattedMessage,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user