-
Notifications
You must be signed in to change notification settings - Fork 414
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: allow relying on manually defined user ID when resolving users/email #954
base: master
Are you sure you want to change the base?
feat: allow relying on manually defined user ID when resolving users/email #954
Conversation
@GerkinDev can you fix the spotbugs issues? |
351b8ec
to
c6affc4
Compare
Done ! |
c6affc4
to
aa74955
Compare
Hi, can I have any info about if you're interested in such change, or if you want to change some behavior? My organization would greatly benefit from this, since we are almost unable to ping any user because our github email addresses is not the same as our slack addresses. If you have any suggestions about how we could make it work without this change, I would gladly take it. As an alternative, I've imagined adding a global map, mapping addresses to slack ids out of user profiles, but it would add a whole new logic. |
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.
Hi,
I don't really want this in the main resolver as its just guessing based on organisation policies, (I find it quite odd slack and SCM emails aren't matching anyway =/)
Options I see:
- users can currently set their Slack ID on their profile and that will be used. This may not be great for scaling if an admin wants to do this centrally.
- create a global list somehow, or maybe add a url to fetch a JSON document from? (I've done this before but in a pipeline library), (probably as another SlackUserId resolver)
- add a new SlackUserId resolver (ideally in your own custom plugin but could maybe be here) doing this.
Thank you for the feedback. I'll look for the 1st solution you've suggested. If we cannot achieve the behavior we want with it, I'll open a new PR with a new resolver implementing 2. & 3. I don't feel like creating a new plug-in, since no one in my team would be able to maintain it. You can close this PR if you want |
Change the behavior of
EmailSlackUserIdResolver::resolveUserIdForEmailAddress
, to allow sending notifications to users who's slack email is not their Jenkins email@
in the email address, as seen in my local Jenkins install), and fetch that user's Slack IDTesting done
Added some tests.
Tried to resolve a user via auto infered username from Jenkins pipeline
Submitter checklist