Permalink
Browse files

link to appropriate README

  • Loading branch information...
1 parent 98252bb commit 7c30b7da53161080e4dcdf226ad15ba6db3b4986 @jasonmay jasonmay committed Dec 17, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 web/build-project-list.pl
@@ -62,15 +62,15 @@
$project ->{badge_has_tests} = $files{t} || $files{test} || $files{tests} ;
- my $has_readme = grep exists $files{$_}, qw/
+ my @readmes = grep exists $files{$_}, qw/
README
README.pod
README.md
README.mkdn
README.markdown
/;
- $project ->{badge_has_readme} = $has_readme ? "http://github.com/$project->{auth}/$project->{name}/blob/master/README" : undef;
+ $project ->{badge_has_readme} = scalar(@readmes) ? "http://github.com/$project->{auth}/$project->{name}/blob/master/$readmes[0]" : undef;
$project ->{badge_is_popular} = $repository->{repository}->{watchers} && $repository->{repository}->{watchers} > 50;
sleep(3) ; #We are allowed 60 calls/min = 1 api call per second, and we are wasting 3 per request so we sleep for 3 secs to make up
return;

0 comments on commit 7c30b7d

Please sign in to comment.