Add channel_id output parameter (#149)

This commit is contained in:
Marian Soltys
2022-11-02 10:34:21 -04:00
committed by GitHub
parent 8085234d28
commit 2188bf0d1b
2 changed files with 4 additions and 0 deletions
+2
View File
@@ -23,6 +23,8 @@ outputs:
description: 'The timestamp on the message that was posted into Slack when using bot token'
ts: # timestamp of message posted
description: 'The timestamp on the message that was posted into Slack when using bot token'
channel_id: # Id of the channel. If channel name was used as input we can get ID from output for later use when updating message or posting to thread.
description: 'The channel id of the message that was posted into Slack when using bot token'
runs:
using: 'node16'
main: 'dist/index.js'
+2
View File
@@ -145,6 +145,8 @@ module.exports = async function slackSend(core) {
// return the thread_ts if it exists, if not return the ts
const thread_ts = webResponse.thread_ts ? webResponse.thread_ts : webResponse.ts;
core.setOutput('thread_ts', thread_ts);
// return id of the channel from the response
core.setOutput('channel_id', webResponse.channel);
}
const time = (new Date()).toTimeString();