Example #1
0
 public static function getExternalForScmCommitLink(Project $project, Project_Build $project_build)
 {
     //
     // GitHub
     //
     if (preg_match('/(github\\.com)[:\\/](\\w+)\\/(\\w+)\\.git/', $project->getScmRemoteRepository(), $matches)) {
         return "https://{$matches[1]}/{$matches[2]}/{$matches['3']}/commit/{$project_build->getScmRevision()}";
     }
     return '';
 }