kuleuven / jenkins-mattermost-plugin

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

Make username field configurable #11

Closed tarrychk closed 8 years ago

tarrychk commented 8 years ago

Hi,

I'm using mattermost plugin to send alerts for failed jobs to a central Mattermost instance. I have multiple jenkins servers that all end up using the same username "jenkins" in the alerts channel. The alert origin is differentiable by the custom icon I send with the alert but it would be really nice if the plugin would allow to override the default username "jenkins" with a custom one.

jovandeginste commented 8 years ago

I started adding a username field but then thought it might be even better to add it in the channel/room list.

Eg.: jenkins@channelx, otheruser@channely

(You can already list multiple channels in the room field)

This would be a lot less code than what's in my wip-branch, and mean more flexibility.

Omitting the username in the room could default to 'jenkins' in that case.

Thoughts?

tarrychk commented 8 years ago

This would work for me.

jovandeginste commented 8 years ago

I created a new release, but can't upload it to jenkins-ci (their servers seem to be down).

You can try it manually here: https://github.com/jenkinsci/mattermost-plugin/releases/tag/mattermost-2.1.0

Please confirm whether this solves your case. Hopefully it is not possible to have Mattermost channels containing an '@' symbol :-)

tarrychk commented 8 years ago

Mattermost plugin 2.1.0 works great! Thank you very much :-)

jovandeginste commented 8 years ago

Published in the Jenkins maven repo too (after going through a lot of trouble ...)