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 <sverre....@gmail.com> 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 jenkinsci-users+unsubscr...@googlegroups.com.
> 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 jenkinsci-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAPiUgVeBxVd3fwmbf4ZpypOLvmhnbdzkbUo7z7iJ1rvQMowprA%40mail.gmail.com.

Reply via email to