Skip to content

Commit

Permalink
chore(release): 1.1.0 [skip ci]
Browse files Browse the repository at this point in the history
# [1.1.0](v1.0.1...v1.1.0) (2019-12-16)

### Bug Fixes

* fix missing querystring indicator ([874e35a](874e35a))

### Features

* support custom message ([e6db3f4](e6db3f4))
  • Loading branch information
semantic-release-bot committed Dec 16, 2019
1 parent 17d8432 commit bdd4c48
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# [1.1.0](https://github.com/mooyoul/melon-ticket-actions/compare/v1.0.1...v1.1.0) (2019-12-16)


### Bug Fixes

* fix missing querystring indicator ([874e35a](https://github.com/mooyoul/melon-ticket-actions/commit/874e35a14292ea6734197f4f41c97c878847c930))


### Features

* support custom message ([e6db3f4](https://github.com/mooyoul/melon-ticket-actions/commit/e6db3f496881ecf2b04e92d1862073620d53ae17))

## [1.0.1](https://github.com/mooyoul/melon-ticket-actions/compare/v1.0.0...v1.0.1) (2019-12-15)


Expand Down
6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const webhook_1 = require("@slack/webhook");
const axios_1 = require("axios");
const qs = require("querystring");
(async () => {
var _a;
// Validate parameters
const [productId, scheduleId, seatId, webhookUrl] = [
"product-id",
Expand All @@ -18,6 +19,7 @@ const qs = require("querystring");
}
return value;
});
const message = (_a = core.getInput("message"), (_a !== null && _a !== void 0 ? _a : "티켓사세요"));
const webhook = new webhook_1.IncomingWebhook(webhookUrl);
const res = await axios_1.default({
method: "POST",
Expand All @@ -36,10 +38,10 @@ const qs = require("querystring");
// tslint:disable-next-line
console.log("Got response: ", res.data);
if (res.data.chkResult) {
const link = `http://ticket.melon.com/performance/index.htm${qs.stringify({
const link = `http://ticket.melon.com/performance/index.htm?${qs.stringify({
prodId: productId,
})}`;
await webhook.send(`티켓사세요 ${link}`);
await webhook.send(`${message} ${link}`);
}
})().catch((e) => {
console.error(e.stack); // tslint:disable-line
Expand Down

0 comments on commit bdd4c48

Please sign in to comment.