Some scm providers can map usernames to emails directly. So, it doesn't require AD or LDAP for email resolution. In the end, if none of the resolvers returns a valid response, then the default domain is appended to the username and that is used.
On Thu, Apr 30, 2020, 12:42 Sverre Moe <[email protected]> wrote: > I see that getAuthorEmail is only part of the GitChangeSet not its super > ChangeSet.Entry. > > Seems better to get the Email rather the Name and then do lookup. The > commit has both Name and Email, both should belong in the ChangeSet API. > What does it do if you don't have AD or LDAP on Jenkins, then there is > nothing to lookup. > > torsdag 30. april 2020 02.18.25 UTC+2 skrev slide følgende: >> >> The only method available via the ChangeSet API is getAuthor(), which >> internally does the lookup to make sure the email address is available, so >> no, it can't access author email directly. >> >> On Wed, Apr 29, 2020 at 8:18 AM Sverre Moe <[email protected]> wrote: >> >>> My code for finding the changeset authors worked fine. >>> If any developers have wrong email address, then so be it. >>> This solution is much much faster. >>> >>> def getAuthors(build) { >>> final def authors = [] >>> final def changeSets = build.changeSets >>> for (def cs: changeSets) { >>> final def author = cs.getAuthorEmail() >>> authors.add(author) >>> } >>> return authors.join(" ") >>> } >>> >>> Though it would preffer to use emailextrecipients, because it can do so >>> much more. Not just developers, but culprits, etc. >>> >>> The emailextrecipient could use an configuration option to retrieve the >>> AuthorEmail instead directly, no lookup/resolve needed. >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Jenkins Users" group. >>> To unsubscribe from this group and stop receiving emails from it, send >>> an email to [email protected]. >>> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/jenkinsci-users/c6fa5643-4330-4b4f-a59f-0216f9f214f9%40googlegroups.com >>> <https://groups.google.com/d/msgid/jenkinsci-users/c6fa5643-4330-4b4f-a59f-0216f9f214f9%40googlegroups.com?utm_medium=email&utm_source=footer> >>> . >>> >> >> >> -- >> Website: http://earl-of-code.com >> > -- > You received this message because you are subscribed to the Google Groups > "Jenkins Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jenkinsci-users/5691f5d0-dae8-4452-bf7e-3993f5df17fd%40googlegroups.com > <https://groups.google.com/d/msgid/jenkinsci-users/5691f5d0-dae8-4452-bf7e-3993f5df17fd%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAPiUgVdjxu6OsOV5i0Z2%3DzHaPv526mcYymSQB6%2BMEG8U5KcPww%40mail.gmail.com.
