Comments (4)
Hi
Place the JSON values inside single quotes for the configurations.
Please find the config that I am using :
export HUBOT_JIRA_PRIORITIES_MAP='[{"name":"Blocker","id":"1"},{"name":"Critical","id":"2"},{"name":"Major","id":"3"},{"name":"Minor","id":"4"},{"name":"Trivial","id":"5"}]'
export HUBOT_JIRA_PROJECTS_MAP='{"web":"WEB","android":"AN","ios":"IOS","platform":"PLAT"}'
export HUBOT_JIRA_TRANSITIONS_MAP='[{"name":"triage","jira":"Triage"},{"name":"icebox","jira":"Icebox"},{"name":"backlog","jira":"Backlog"},{"name":"devready","jira":"Selected for Development"},{"name":"inprogress","jira":"In Progress"},{"name":"design","jira":"Design Triage"}]'
export HUBOT_JIRA_TYPES_MAP='{"story":"Story","bug":"Bug","task":"Task"}'
export HUBOT_JIRA_FIELDS='["issuetype","status","assignee","reporter","summary","description","labels","project"]'
export HUBOT_SLACK_BUTTONS='{"watch":{"name":"watch","text":"Watch","type":"button","value":"watch","style":"primary"},"assign":{"name":"assign","text":"Assign to me","type":"button","value":"assign"},"devready":{"name":"devready","text":"Dev Ready","type":"button","value":"selected"},"inprogress":{"name":"inprogress","text":"In Progress","type":"button","value":"progress"},"rank":{"name":"rank","text":"Rank Top","type":"button","value":"top"},"running":{"name":"running","text":"Running","type":"button","value":"running"},"review":{"name":"review","text":"Review","type":"button","value":"review"},"resolved":{"name":"resolved","text":"Resolved","type":"button","style":"primary","value":"resolved"},"done":{"name":"done","text":"Done","type":"button","style":"primary","value":"done"}}'
export HUBOT_SLACK_PROJECT_BUTTON_STATE_MAP='{"PLAT":{"inprogress":["review","running","resolved"],"review":["running","resolved"],"running":["resolved"],"resolved":["devready","inprogress"],"mention":["watch","assign","devready","inprogress","rank"]},"HAL":{"inprogress":["review","running","resolved"],"review":["running","resolved"],"running":["resolved"],"resolved":["devready","inprogress"],"mention":["watch","assign","devready","inprogress","rank"]},"default":{"inprogress":["review","done"],"review":["done"],"done":["devready, inprogress"],"mention":["watch","assign","devready","inprogress","rank"]}}'
from hubot-jira-bot.
Getting same here. It's a wonder, none of the JIRA scripts work for me for Hubot.
from hubot-jira-bot.
Make sure your environment variables don't have quotes around them.
Correct:
HUBOT_JIRA_PROJECTS_MAP={"web":"web","android":"AND","ios":"IOS"}
Incorrect:
HUBOT_JIRA_PROJECTS_MAP="{"web":"SFT","android":"AND","ios":"IOS"}"
from hubot-jira-bot.
I get the same error : for variable : HUBOT_JIRA_PROJECTS_MAP={"web":"web","android":"AND","ios":"IOS"}
---- full error message: ---
] ERROR Unable to load /home/mkrish6/tars/node_modules/hubot-jira-bot/src/index: SyntaxError: Unexpected token w in JSON at position 1
at Object.parse (native)
at /home/mkrish6/tars/node_modules/hubot-jira-bot/src/config.coffee:36:5, :30:22
at Object. (/home/mkrish6/tars/node_modules/hubot-jira-bot/src/config.coffee:21:1, :197:5)
at Object. (/home/mkrish6/tars/node_modules/hubot-jira-bot/src/config.coffee:21:1, :201:4)
at Module._compile (module.js:570:32)
at Object.loadFile (/home/mkrish6/tars/node_modules/coffee-script/lib/coffee-script/coffee-script.js:182:19)
at Module.load (/home/mkrish6/tars/node_modules/coffee-script/lib/coffee-script/coffee-script.js:211:36)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object. (/home/mkrish6/tars/node_modules/hubot-jira-bot/src/index.coffee:23:10, :8:12)
at Object. (/home/mkrish6/tars/node_modules/hubot-jira-bot/src/index.coffee:20:1, :563:4)
at Module._compile (module.js:570:32)
at Object.loadFile (/home/mkrish6/tars/node_modules/coffee-script/lib/coffee-script/coffee-script.js:182:19)
at Module.load (/home/mkrish6/tars/node_modules/coffee-script/lib/coffee-script/coffee-script.js:211:36)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Robot.loadFile (/home/mkrish6/tars/node_modules/hubot/src/robot.coffee:355:9, :224:20)
at /home/mkrish6/tars/node_modules/hubot-jira-bot/index.coffee:7:5, :13:22
at FSReqWrap.cb [as oncomplete] (fs.js:257:19)
from hubot-jira-bot.
Related Issues (20)
- Unable to lookup users in jira, assigning tickets to bot user instead HOT 3
- Search By JIRA NUMBER HOT 2
- Utils.JiraBot.adapter.getUsers() not getting correct information HOT 5
- reason: self signed certificate in certificate chain HOT 1
- json error HOT 1
- enabling buttons in slack question HOT 1
- Could not able to issue Ticket assign command HOT 2
- 101 Guide to Starting Up HOT 2
- Utils.JiraBot.adapter.getUsers() not getting correct information in utils.coffee
- HUBOT_JIRA_GITHUB_DISABLED not parsed
- Case insensitive check for email HOT 2
- Add note on buttons
- assignment/comment/watch does not work HOT 1
- invalid json response Unexpected token < HOT 1
- JSON.parse error HOT 1
- hubot-jira-bot commands don't work
- UNEXPECTED INDENT ERROR
- How about Bitbucket ?
- error: Can't call super with @params in derived class constructors
- Does it work with Google Chat? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hubot-jira-bot.