ndaversa / hubot-jira-bot

Lets you search for JIRA tickets, open them, transition them thru different states, comment on them, rank them up or down, start or stop watching them or change who is assigned to a ticket. Also, notifications for assignments, mentions and watched tickets.
https://www.npmjs.com/package/hubot-jira-bot
MIT License
61 stars 43 forks source link

Hubot-jira-bot calls api.github.com ? #15

Closed sylvesterjakubowski closed 8 years ago

sylvesterjakubowski commented 8 years ago

Just discovered this hubot script calls github.com with the query string of the ticket you are looking for instead of just calling the JIRA instance you have defined.

I'm on github enterprise, none of my issues would be on github.com.

I discovered this via getting

[Mon Jun 27 2016 17:17:56 GMT-0400 (EDT)] ERROR Error: {"message":"API rate limit exceeded for 64.40.252.178. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)","documentation_url":"https://developer.github.com/v3/#rate-limiting"}
  at /home/sjakubowski/hubot2/node_modules/octokat/dist/node/requester.js:214:21
  at xhr.onreadystatechange (/home/sjakubowski/hubot2/node_modules/octokat/dist/node/requester.js:39:18)
  at dispatchEvent (/home/sjakubowski/hubot2/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:593:25)
  at setState (/home/sjakubowski/hubot2/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:612:14)
  at IncomingMessage.<anonymous> (/home/sjakubowski/hubot2/node_modules/xmlhttprequest/lib/XMLHttpRequest.js:449:13)
  at emitNone (events.js:91:20)
  at IncomingMessage.emit (events.js:185:7)
  at endReadableNT (_stream_readable.js:934:12)
  at _combinedTickCallback (internal/process/next_tick.js:74:11)
  at process._tickCallback (internal/process/next_tick.js:98:9)

Nothing in the documentation mentions calling the github issues api?

https://www.npmjs.com/package/hubot-jira-bot

How can I disable this?

sylvesterjakubowski commented 8 years ago

Looking through the code, looks like there isn't, I'll submit a PR with a ENV flag to turn this off.

Thanks.

The plugin works well otherwise and is a big help.

sylvesterjakubowski commented 8 years ago

https://github.com/ndaversa/hubot-jira-bot/pull/17

ndaversa commented 8 years ago

18