Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Allow http(s?) source URLs
before, only git:// URLs were allowed
  • Loading branch information
moritz committed Sep 30, 2014
1 parent 445cadb commit 0d08cbd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/lib/P6Project/Info.pm
Expand Up @@ -44,12 +44,12 @@ sub get_projects {
my $url = $json->{'source-url'} // $json->{'repo-url'};
$projects->{$name}->{'url'} = $url;
$projects->{$name}{success} = 0;
my ($home) = $url =~ m[git://([\w\.]+)/];
my ($home) = $url =~ m[(?:git|https?)://([\w\.]+)/];
if ($home) {
given ($home) {
when (/github/) {
$projects->{$name}->{'home'} = 'github';
my ($auth, $repo_name) = $url =~ m[git://$home/([^/]+)/([^/]+)\.git];
my ($auth, $repo_name) = $url =~ m[(?:git|https?)://$home/([^/]+)/([^/]+)\.git];
$projects->{$name}->{'auth'} = $auth;
$projects->{$name}->{'repo_name'} = $repo_name;
}
Expand Down

0 comments on commit 0d08cbd

Please sign in to comment.