Closed ivanblagdan closed 8 years ago
:+1:
@ivanblagdan I get the following error from testing your branch:
/root/slack-jira-plugin/config.js:32
error_channel: '' //the id of the channel to send low level log errors. If
^^^^^^^^^^^^^
SyntaxError: Unexpected identifier
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Function.Module.runMain (module.js:497:10)
at startup (node.js:119:16)
at node.js:902:3
Looks like a issue with your config. Want to share it?
@ivanblagdan Ack! I was missing a comma after the previous entry! Now I feel like an idiot.... :frowning: :100:
I presume its working out for you now? :)
@ivanblagdan I can't test due to #5 , but I don't think that has anything to do with your branch.
@ivanblagdan Do you have the output of a running example? I got past #5 (and #6 for now) but I still only get the url for the issue.
Did you enable the details setting in your config? showIssueDetails: true, showDetailsByDefault: true,
I did, and I don't seem to get any details (even author or issue title). I'm still working on it, but my config is pretty much the same as in #5
Any news here? The code that handles what you are reporting is pretty simple.
if (self.config.showIssueDetails && expandInfo) {
attachments.push(generateAttachement(configUrl, issue));
var req = {"channel": message.channel, "attachments": attachments, "text": " "};
}else{
var req = {"channel": message.channel, "text": msg};
}
Sorry @ivanblagdan I haven't had time to follow up on it, but I'll try and track it down shortly.
Just seeing this now, if you get a chance @ivanblagdan please update.
@gsingers there you go.
Cannot read property 'displayName' of null
TypeError: Cannot read property 'displayName' of null
at generateAttachement (/home/coagulant/slack-jira-plugin/lib/bot.js:63:37)
at /home/coagulant/slack-jira-plugin/lib/bot.js:240:40
at Request._callback (/home/coagulant/slack-jira-plugin/node_modules/jira/lib/jira.js:236:13)
at Request.self.callback (/home/coagulant/slack-jira-plugin/node_modules/jira/node_modules/request/main.js:127:22)
at Request.EventEmitter.emit (events.js:98:17)
at Request.<anonymous> (/home/coagulant/slack-jira-plugin/node_modules/jira/node_modules/request/main.js:767:16)
at Request.EventEmitter.emit (events.js:117:20)
at IncomingMessage.<anonymous> (/home/coagulant/slack-jira-plugin/node_modules/jira/node_modules/request/main.js:729:14)
at IncomingMessage.EventEmitter
If assignee is not set.
Colors are kinda strange (danger for all statues except closed).
Thnx for this PR, a good base for further improvement and customization!
Finally a chance to review, @coagulant. Sorry for the delay. Can you make this optional by adding it as a flag to the config? My team prefers the more succinct format that is currently in play, although I am amenable to committing it.
@gsingers That's not my code, I'm just using @ivanblagdan code from this pull request ;) :+1: for making attachments configurable
Here's a screenshot of how the attachments look like in Slack for anyone looking.
@ivanblagdan See above. Can you make it optional and update it?
Sure I could do that. Its low on my list though so it might take a while, if anyone wants to jump in go ahead.
I think this is replaced by some of the other updates, so closing out.
I've did a quick and dirty implementation of attachments for more detailed issues inside slack. Should be self explanatory, here are some more details on the Slack API for this https://api.slack.com/docs/attachments