-
Notifications
You must be signed in to change notification settings - Fork 153
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
feat(slack): Support set username and icon from template in slack #340
feat(slack): Support set username and icon from template in slack #340
Conversation
Signed-off-by: ayatk <[email protected]>
a8d054e
to
9c622b6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
I have tested locally and found that in some use cases the notification is sent once with the username and icon, and once without them, meaning with the default ones, I tried that with "on-sync-succeeded" trigger.
@reggie-k Thank you for your review! I'm sorry, but I don't really understand the situation. Is it okay to understand that in the case of the "on-sync-succeeded" trigger, two notifications are sent: one with the username and icon set, and one without? |
Yeah, exactly |
I looked into it, but I couldn't reproduce the situation you described...
I would like to confirm, does this problem occur in the revision before this PR? For example, if the same problem does not occur when the |
Not sure I understand what to confirm? The problem is that, while the icon and username are set in the config like described in the docs of this PR, in the 2 slack notifications produced upon manually syncing the app from the UI, only one is actually with the username and icon configured, and the other one does not have the username and the icon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry!
This was a problem with my local config.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you. Please open PR into Argo CD with notification-engine update
@reggie-k @pasha-codefresh |
When multiple users set triggers and templates for one slack service in monorepos, etc., there was an issue where the icon and username could not be changed. Therefore, I made it possible to set a custom username and icon in the template used for Slack notifications.
If the username and icon are already set on the service side and the username and icon are also set on the template, the template will take priority.
And there were no tests for Slack notifications, so I added them.