kuleuven / jenkins-mattermost-plugin

Jenkins plugin for Mattermost
MIT License
24 stars 46 forks source link

Support for direct message channels #19

Closed alexjrussell closed 7 years ago

alexjrussell commented 7 years ago

Hello,

Thank you for creating this extremely useful plugin, we use it extensively in my department. One small problem we have with it, however, is that we can't upgrade from version 2.0.2 because direct message channels no longer work. The problem comes from the fact that direct message channel names are in the format @dmchannel and this is not compatible witth the plugin logic where you can specify user@channel.

In our Mattermost set-up, we have a user called jenkins that owns the webhooks and this means that if you specify @username as the Mattermost channel, the user will get a direct message from the jenkins user. This is useful because users are more likely to notice direct messages.

Anyway, I have attached a patch that I made to the code on the master branch that I have recently tried in a test jenkins installation. I would be very grateful if you would consider adding this or something simlilar to a future release.

Many thanks

mmplugin.patch.txt

jovandeginste commented 7 years ago

@alexjrussell out of curiosity, why did you not make a pull request?

I'll look into this Monday or Tuesday. Thanks in advance!

alexjrussell commented 7 years ago

@jovandeginste I couldn't work out how to create a pull request at first but I managed to do it now :) Hope that helps. Many thanks

jovandeginste commented 7 years ago

Great work, thanks in advance! Will look into it on Monday. Are you running master branch with your PR now?

jovandeginste commented 7 years ago

Should be released shortly; for the impatient: https://github.com/jenkinsci/mattermost-plugin/releases

alexjrussell commented 7 years ago

Awesome! Thanks for adding this change so quickly!

jovandeginste commented 7 years ago

When you provide a clean patch, it's easy to work fast.