b-sharpe / SlackStorm

PHP Storm (IntelliJ) plugin that allows posting code snippets to a Slack channel
GNU General Public License v2.0
21 stars 12 forks source link

Add context (file name, line #) to message #3

Closed markwoon closed 8 years ago

markwoon commented 9 years ago

It would be great if the selection automatically included the file name and line number.

In fact, this is often the only thing I want to send, so if that were possible as well (i.e. without have to select anything) that would be great.

It would also be great if it you could include the user name...

b-sharpe commented 8 years ago

I like the idea of file name and line number. I think sending just that isn't worth it as you can just select a single line or blank space to do that (single line would give better context like a diff as well).

Username won't be possible without asking the user for it as we're using a webhook which is independent of user.

I've added the first stuff to my todo list.

markwoon commented 8 years ago

Don't you have access to the environment? You could just grab the user from there if you don't want to ask for the user directly. Although I'd point out you're already asking for the webhook token, so asking for a username isn't that much more...

When using it on internal teams at least it doesn't need to match the slack user since we all know each other. With the user info we wouldn't have to go claim the snippet right after posting it.

b-sharpe commented 8 years ago

Added this functions: 80f837b6145559e1ed7f7bd5059fae4384f5acf0

Also updated in plugins, so can update right from IDE.

markwoon commented 8 years ago

Thanks. That's perfect.