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