Browse code

make listing/not listing of forks configurable

some people have more or less taken over projects with their forks, so
it probably makes sense to still list them among the repositories

Philip Hofstetter authored on 04/08/2011 at 19:24:48
Showing 2 changed files
... ...
@@ -20,6 +20,7 @@
20 20
         github.showRepos({
21 21
             user: '{{site.github_user}}',
22 22
             count: {{site.github_repo_count}},
23
+            skip_forks: {{site.github_skip_forks}},
23 24
             target: '#gh_repos'
24 25
         });
25 26
     });
... ...
@@ -18,8 +18,9 @@ github = (function(){
18 18
                 var repos = [];
19 19
                 var i;
20 20
                 for (i = 0; i < data.repositories.length; i++){
21
-                  if (!data.repositories[i].fork)
22
-                    repos.push(data.repositories[i]);
21
+                  if (options.skip_forks && !data.repositories[i].fork)
22
+                    continue;
23
+                  repos.push(data.repositories[i]);
23 24
                 }
24 25
                 repos.sort(function(a, b){
25 26
                     var a = new Date(a.pushed_at),