private void executeForProject(Component project) {
    Metric metric = metricRepository.getByKey(CoreMetrics.ALERT_STATUS_KEY);
    Optional<Measure> rawStatus = measureRepository.getRawMeasure(project, metric);
    if (!rawStatus.isPresent() || !rawStatus.get().hasQualityGateStatus()) {
      return;
    }

    checkQualityGateStatusChange(project, metric, rawStatus.get().getQualityGateStatus());
  }
 @Override
 public void visitProjectView(Component projectView, Path<LastCommit> path) {
   Optional<Measure> rawMeasure =
       measureRepository.getRawMeasure(projectView, lastCommitDateMetric);
   if (rawMeasure.isPresent()) {
     // path.parent() should never fail as a project view must never be a root component
     path.parent().addDate(rawMeasure.get().getLongValue());
   }
 }