UNPKG

@reactivehub/cli

Version:
48 lines (37 loc) 1.26 kB
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends2 = require('babel-runtime/helpers/extends'); var _extends3 = _interopRequireDefault(_extends2); var _api = require('../../../services/api'); var _template = require('./template'); var _template2 = _interopRequireDefault(_template); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } const questions = () => [{ type: 'input', name: 'jiraWebhookId', message: 'Enter the JIRA WEBHOOK ID (wildcards allowed): ' }]; const CREATE_WEBHOOK = { name: 'CREATE_WEBHOOK', deploy: (action, eventInfo) => (0, _api.sendAction)(eventInfo, (0, _extends3.default)({ serviceAction: 'CREATE_WEBHOOK' }, action)), buildTemplate: () => { const { webhook: payload } = _template2.default; return { payload }; }, questions: () => {} }; const DELETE_WEBHOOK = { name: 'DELETE_WEBHOOK', deploy: (action, eventInfo) => (0, _api.sendAction)(eventInfo, (0, _extends3.default)({ serviceAction: 'DELETE_WEBHOOK' }, action)), buildTemplate: (answers = {}) => (0, _extends3.default)({}, answers), questions }; exports.default = { CREATE_WEBHOOK, DELETE_WEBHOOK }; //# sourceMappingURL=index.js.map