This repository has been archived by the owner on Feb 28, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jira.json
25 lines (25 loc) · 1.59 KB
/
jira.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{
"name": "jira",
"version": "0.0.6",
"type": "actuator",
"script": "const axios = require('axios')\n\nconst user = options.requiredProperties.JIRA_USER\nconst password = options.requiredProperties.JIRA_PASSWORD\nconst url = options.requiredProperties.JIRA_URL\n\nconst subject = options.requiredProperties.subject\nconst message = options.requiredProperties.message\nconst type = options.requiredProperties.type || 'Bug'\nconst project = options.requiredProperties.project\n\nasync function execute () {\n const data = {\n fields: {\n project: {\n key: project\n },\n summary: subject,\n description: message,\n issuetype: {\n name: type\n }\n }\n }\n await axios.post(url, data, {\n auth: {\n user: user,\n password: password\n }\n })\n send()\n}\n\nexecute().catch(send)",
"metadata": {
"author": "",
"category": "",
"description": "<h4>Jira Actuator</h4>\n<br>\nCreates an issue on jira.\n<br><br>\n<b>Properties</b>\n<ul>\n <li>\n project\n </li>\n <li>\n message\n </li>\n <li>\n subject\n </li>\n <li>\n type (Task, Bug ...)\n </li>\n <li>\n JIRA_USER\n </li>\n <li>\n JIRA_PASSWORD\n </li>\n <li>\n JIRA_URL\n </li>\n</ul>",
"iconURL": "https://static.waylay.io/plugs/icons/jira_icon.png",
"supportedStates": [],
"requiredProperties": [
"subject",
"message",
"type",
"project",
"JIRA_USER",
"JIRA_PASSWORD"
],
"requiredRawData": []
},
"dependencies": {
"axios": "0.19.2"
}
}