Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Normalize dist URLs
Otherwise, we often end up missing github repo URLs from dists
  • Loading branch information
zoffixznet committed Nov 12, 2015
1 parent 3ac0bc2 commit 31b9712
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions web/lib/P6Project/Info.pm
Expand Up @@ -50,6 +50,12 @@ sub get_projects {
my $url = $json->{'source-url'} // $json->{'repo-url'}
// $json->{support}->{source};

for ( $url ) {
s/^\s+|\s+$//g;
$_ .= '.git' if m{^git://} and not m{\.git$};
$_ .= '/' if m{^https?://} and not m{/$} ;
}

$projects->{$name}->{'url'} = $url;
$projects->{$name}{success} = 0;

Expand Down

0 comments on commit 31b9712

Please sign in to comment.