Skip to content

Commit

Permalink
fix: remove the rest of slack channel default value
Browse files Browse the repository at this point in the history
  • Loading branch information
homoluctus committed Sep 7, 2019
1 parent e4a9ddb commit b3e6e83
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function run() {
const job_name = core.getInput('job_name', { required: true });
const username = core.getInput('username') || 'Github Actions';
const icon_emoji = core.getInput('icon_emoji') || 'github';
const channel = core.getInput('channel') || '#general';
const channel = core.getInput('channel');
const url = core.getInput('url') || process.env.SLACK_WEBHOOK || '';
if (url === '') {
throw new Error(`
Expand Down
2 changes: 1 addition & 1 deletion lib/slack.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const github = __importStar(require("@actions/github"));
const core = __importStar(require("@actions/core"));
const webhook_1 = require("@slack/webhook");
class Slack extends webhook_1.IncomingWebhook {
constructor(url, username = 'Github Actions', icon_emoji = 'github', channel = '#general') {
constructor(url, username, icon_emoji, channel) {
super(url, { username, icon_emoji, channel });
}
/**
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ async function run() {
const job_name: string = core.getInput('job_name', { required: true });
const username: string = core.getInput('username') || 'Github Actions';
const icon_emoji: string = core.getInput('icon_emoji') || 'github';
const channel: string = core.getInput('channel') || '';
const channel: string = core.getInput('channel');
const url: string = core.getInput('url') || process.env.SLACK_WEBHOOK || '';

if (url === '') {
Expand Down
6 changes: 3 additions & 3 deletions src/slack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ export class Slack extends IncomingWebhook {

constructor(
url: string,
username: string = 'Github Actions',
icon_emoji: string = 'github',
channel: string = '#general'
username: string,
icon_emoji: string,
channel: string
) {
super(url, {username, icon_emoji, channel});
}
Expand Down

0 comments on commit b3e6e83

Please sign in to comment.