Skip to content

Commit

Permalink
add: env var for private tests channel id (paritytech#177)
Browse files Browse the repository at this point in the history
  • Loading branch information
mario-sangar authored Jan 14, 2021
1 parent 091dedd commit a19aae5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/bots/mission-control-bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ const params = {
// Discord app information
DISCORD_TOKEN: process.env.DISCORD_TOKEN,
DISCORD_CHANNEL: process.env.DISCORD_CHANNEL,
TESTS_DISCORD_CHANNEL: process.env.TESTS_DISCORD_CHANNEL,

// Slack app information
SLACK_WEBHOOK: process.env.SLACK_WEBHOOK,
Expand Down Expand Up @@ -281,7 +282,7 @@ const onReceiveMessage = async (msg: Message) => {
const messageContent = msg && msg.content;
const channelId = msg && msg.channel && msg.channel.id;

if (!messageContent || !authorId || channelId != params.DISCORD_CHANNEL) {
if (!messageContent || !authorId || ![params.DISCORD_CHANNEL, params.TESTS_DISCORD_CHANNEL].includes(channelId)) {
return;
}

Expand Down

0 comments on commit a19aae5

Please sign in to comment.