GithubHelp home page GithubHelp logo

Comments (4)

alexanto09 avatar alexanto09 commented on August 23, 2024 1

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.

Legoless avatar Legoless commented on August 23, 2024

Getting same here. It's a wonder, none of the JIRA scripts work for me for Hubot.

from hubot-jira-bot.

ijunes avatar ijunes commented on August 23, 2024

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.

murali2020kris avatar murali2020kris commented on August 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.