Skip to content

Commit

Permalink
[npm] run publish
Browse files Browse the repository at this point in the history
  • Loading branch information
8398a7 committed Sep 14, 2019
1 parent e7b3f91 commit e03a819
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
7 changes: 5 additions & 2 deletions lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ class Client {
if (process.env.SLACK_WEBHOOK_URL === undefined) {
throw new Error('Specify secrets.SLACK_WEBHOOK_URL');
}
const url = process.env.SLACK_WEBHOOK_URL;
this.webhook = new webhook_1.IncomingWebhook(url);
this.webhook = new webhook_1.IncomingWebhook(process.env.SLACK_WEBHOOK_URL);
}
success(text) {
return __awaiter(this, void 0, void 0, function* () {
Expand Down Expand Up @@ -84,6 +83,10 @@ class Client {
{
color: '',
author_name: this.with.author_name,
username: this.with.username,
icon_emoji: this.with.icon_emoji,
icon_url: this.with.icon_url,
channel: this.with.channel,
fields: [
{
title: 'repo',
Expand Down
18 changes: 16 additions & 2 deletions lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,27 @@ function run() {
const author_name = core.getInput('author_name');
const only_mention_fail = core.getInput('only_mention_fail');
const text = core.getInput('text');
core.debug(`text: ${text}`);
core.debug(`mention: ${mention}`);
const username = core.getInput('username');
const icon_emoji = core.getInput('icon_emoji');
const icon_url = core.getInput('icon_url');
const channel = core.getInput('channel');
core.debug(`status: ${status}`);
core.debug(`mention: ${mention}`);
core.debug(`author_name: ${author_name}`);
core.debug(`only_mention_fail: ${only_mention_fail}`);
core.debug(`text: ${text}`);
core.debug(`username: ${username}`);
core.debug(`icon_emoji: ${icon_emoji}`);
core.debug(`icon_url: ${icon_url}`);
core.debug(`channel: ${channel}`);
const client = new client_1.Client({
mention,
author_name,
only_mention_fail,
username,
icon_emoji,
icon_url,
channel,
});
switch (status) {
case 'success':
Expand Down

0 comments on commit e03a819

Please sign in to comment.