-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0827892
commit 926938a
Showing
2 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |