argoproj / argoproj/notifications-engine
Slack: Add ability to mention user by username/email
- Dominant language
- Go
- Stars
- 334
- Forks
- 217
- PR merge metrics
- No merged PRs in 30d
Description
The slack API allows mentioning users via their userID like so:
```
Hey <@U024BE7LH>, thanks for submitting your report.
```
However, almost any use-case for Notifications won't include the actul slack userID; Instead, it will have things like an email associated with a git commit.
The slack documentation (linked below) recommends using the `users.list` api to retrieve the ID via some other unique piece of information (such as an email).
Can we expand the engine to parse for things formatted as something like `{{.slack.userEmail}}`, and do a lookup?
It would be equally helpful if we could do the same for:
- channels: `Why not join <#C123ABC456>?`
- groups: `Hey , there's a new task in your queue.`
Reference:
- https://api.slack.com/reference/surfaces/formatting#mentioning-users
- https://api.slack.com/reference/surfaces/formatting#linking-channels
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the Slack formatting references in the issue and trace how notification templates are parsed and sent to Slack. Determine how user, channel, and group identifiers would be resolved from usernames or email addresses, then verify that the resulting mentions work for all three requested forms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100