protected function initIssueMilestoneRepository($project)
 {
     $em = $this->getDoctrine()->getManager();
     $issueIntegrator = $em->getRepository('VersionControlGitControlBundle:ProjectIssueIntegrator')->findOneByProject($project);
     $this->issueManager = $this->get('version_control.issue_repository_manager');
     if ($issueIntegrator) {
         $this->issueManager->setIssueIntegrator($issueIntegrator);
     } else {
         $this->issueManager->setProject($project);
     }
     $this->issueMilestoneRepository = $this->issueManager->getIssueMilestoneRepository();
 }
 /**
  * @param int $id
  */
 public function initAction($id, $grantType = 'VIEW')
 {
     $redirectUrl = parent::initAction($id, $grantType);
     if ($redirectUrl) {
         return $redirectUrl;
     }
     $em = $this->getDoctrine()->getManager();
     $issueIntegrator = $em->getRepository('VersionControlGitControlBundle:ProjectIssueIntegrator')->findOneByProject($this->project);
     $this->issueManager = $this->get('version_control.issue_repository_manager');
     if ($issueIntegrator) {
         $this->issueManager->setIssueIntegrator($issueIntegrator);
     } else {
         $this->issueManager->setProject($this->project);
     }
     $this->issueLabelRepository = $this->issueManager->getIssueLabelRepository();
 }