Open alenkacz opened 8 years ago
You can have an attachmentless version of notifications like this:
:x: Modules :: testmodule [feature/something] #4 failed: Exit code 255
To achieve this you have to set the teamcity.notification.slack.useAttachment internal property to false in TeamCity. For more info see this link.
I'd like to submit a patch to this repo which adds another per-user property which allows the user to configure whether or not they include the "attachment" in their notifications. It could be a simple textual field which accepts "TRUE,FALSE,YES,NO,true,false,yes,no,True,False,Yes,No" and defaults to "True"
The display name could be "Verbose Messages" and it would have the effect of using a SlackWrapper
constructed with "useAttachements" having the boolean version of whatever the user enters. Sure, the better thing would be to make a jsp snippet which uses a checkbox instead of a text field, but this is really easy to implement.
I'll put together a pull request if you're interested.
Sounds good to me, maybe one day we can get a checkbox there, but definitely not needed. It'll be nice to just get this feature out there for people to use.
For me, this is too verbose, I would prefer to be able to specify less verbose message (without the build, status, just the first line with a link).
If it makes sense to you, I can contribute.
Example of a Slack notification as it is done right now: