On Tue, Nov 1, 2016 at 2:04 PM, Tim Downey <timothy.dow...@gmail.com> wrote:
>        if(build.getProject().getRootProject() != build.getProject()) {
>            projectName =
> build.getProject().getRootProject().getDisplayName();
>            configuration = " on " + build.getProject().getDisplayName();
>        } else {
>            projectName = build.getProject().getDisplayName();
>        }
>
>
> From the call, I've switched the fromBuild method to take Run<?,?> instead
> of AbstractProject

Instead of `AbstractBuild` I suppose you mean.

> but the issue is that I'm not clear on what needs to be
> done in the conditional.  The existing code seems to be trying to figure out
> if it is the root project in order to construct the message (which will be
> sent to flowdock) but I'm not sure what the equivalent would be when working
> from Run instead of AbstractProject.

There is no generalization of `AbstractProject.getRootProject`
currently. You can check if the `Job` is in fact an `AbstractProject`
and if so call `getRootProject` on it, else just use the job as is.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/CANfRfr2g0bfiAqh_bDY_3-Cs-D94WMNc-kxd%3DKKDXcXZ55WpWA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to