Skip to content

Commit

Permalink
📦 Commit compiled JavaScript code
Browse files Browse the repository at this point in the history
  • Loading branch information
screendriver committed Aug 16, 2019
1 parent 0827892 commit 926938a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
7 changes: 7 additions & 0 deletions target/src/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const core = tslib_1.__importStar(require("@actions/core"));
const got_1 = tslib_1.__importDefault(require("got"));
const run_1 = require("./run");
run_1.run(core, got_1.default);
15 changes: 15 additions & 0 deletions target/src/run.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
async function run(core, got) {
try {
const event = core.getInput('event', { required: true });
const key = core.getInput('key', { required: true });
const { statusCode, body } = await got.post(`https://maker.ifttt.com/trigger/${event}/with/key/${key}`);
return { statusCode, body };
}
catch (error) {
core.setFailed(error.message);
throw error;
}
}
exports.run = run;

0 comments on commit 926938a

Please sign in to comment.