code: private boolean isInternal(Run r) {
  		boolean result = false;
  
  		//  get upstream cause, if any
  		Cause.UpstreamCause upstreamCause = null;
  		for (Cause cause : (List<Cause>) r.getCauses()) {
  			if (cause instanceof Cause.UpstreamCause) {
  				upstreamCause = (Cause.UpstreamCause) cause;
  				break;          //  TODO: here we are breaking the merged build support
  			}
  		}
  
  		if (upstreamCause != null) {
  			String causeJobName = upstreamCause.getUpstreamProject();
  			TopLevelItem parent = Jenkins.getInstance().getItem(causeJobName);
  			if (parent == null) {
  				if (causeJobName.contains("/") && !causeJobName.contains(",")) {
  					parent = getJobFromFolder(causeJobName);
  					if (parent == null) {
  						result = false;
  					}
  				}
  			} else {
  				if (parent.getClass().getName().equals("org.jenkinsci.plugins.workflow.job.WorkflowJob")) {
  					result = true;
  				} else {
  					List<PipelinePhase> phases = JobProcessorFactory.getFlowProcessor((Job) parent).getInternals();
  					for (PipelinePhase p : phases) {
  						for (PipelineNode n : p.getJobs()) {
  							if (n != null && n.getName().equals(r.getParent().getName())) {
  								return true;
  							}
  						}
  					}
  					return false;
  				}
  			}
  		}
  
  		return result;
  	}
docs: TODO: [YG] this method should be part of causes factory or something like this, it is not suitable for merged build as well