-
Notifications
You must be signed in to change notification settings - Fork 411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhance Custom Message Functionality (rebased from #169) #385
Conversation
This enhances the custom message functionality to include both a default custom message, if defined, and a specific custom message per build failure types.
Needs conflicts fixing |
feel free to reopen when you resolve conflicts |
Hey @timja , thanks for taking over/updating this repo. I took a look at what changes are made so the original #169 commit can be merged in the current master. It seems that with your commit: e1d919a you changed an important part of this commit, mainly the method slack-plugin/src/main/java/jenkins/plugins/slack/SlackNotifier.java Lines 447 to 452 in bd28d4e
I tried to follow your commit and do the appropriate changes on top of that, but I don't know how to add that HashMap as you did (in your config jelly changes). Any ideas on that? I'd love to get this #169 commit merged into mainline. It works beautifully. |
The jelly changes require matching getters and setters, with the setters annotated with |
Ok, so should I try to create a setter that creates that customMessageMap? I'm not sure how jelly will/can handle it, since it's not a simple "value get". It's a Map with values and Results and there is a custom getCustomMessage(String buildType) command that returns the correspondent value. Any pointers would be appreciated. |
I've never tried a map, if you want to continue down that path I would ask: otherwise you could store all the fields on the object directly as from looking at the ui it just seemed to be more fields? |
Original idea from jenkinsci#169 (Enhance Custom Message Functionality by @csogilvie) Discussion in jenkinsci#385 I re-wrote it almost completely on top of the current master
Original idea from jenkinsci#169 (Enhance Custom Message Functionality by @csogilvie) Discussion in jenkinsci#385 I re-wrote it almost completely on top of the current master
Original idea from jenkinsci#169 (Enhance Custom Message Functionality by @csogilvie) Discussion in jenkinsci#385 I re-wrote it almost completely on top of the current master
Original idea from #169 (Enhance Custom Message Functionality by @csogilvie) Discussion in #385 I re-wrote it almost completely on top of the current master
The bd28d4e is a very valuable commit. It makes or breaks the
slack-plugin
experience for me. I took the time to merge it into the current master branch, and fix any problems that arose.I have no idea how to fix the migration problems that #169 mentioned as the reason of no merge. In my experience, I just had to
configure
the project once and then save it. Afterwards, I could move the custom message where I wanted and it works.I'm PRing this so that others can see and use it locally.