diff --git a/action.yml b/action.yml index 3d31641..cf16513 100644 --- a/action.yml +++ b/action.yml @@ -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' diff --git a/dist/index.js b/dist/index.js index 537a0e6..7c4a043 100644 --- a/dist/index.js +++ b/dist/index.js @@ -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, diff --git a/index.js b/index.js index 8652d2d..ae55092 100644 --- a/index.js +++ b/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,