Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add channel_id output parameter #149

Merged
merged 1 commit into from
Nov 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 2 additions & 0 deletions src/slack-send.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down