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] > <javascript:>> 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] <javascript:>. >> 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.
