Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

skip github repos #522

Closed
wants to merge 3 commits into
from
Jump to file or symbol
Failed to load files and symbols.
+13 −1
Split
@@ -21,7 +21,8 @@
user: '{{site.github_user}}',
count: {{site.github_repo_count}},
skip_forks: {{site.github_skip_forks}},
- target: '#gh_repos'
+ target: '#gh_repos',
+ skip_repos: '{{site.github_skip_repos}}'
});
});
</script>
@@ -29,6 +29,15 @@ var github = (function(){
});
if (options.count) { repos.splice(options.count); }
+ skips = options.skip_repos.split(',');
+ if(skips.length > 0){
+ for(var i=0; i < repos.length; i++){
+ if(skips.indexOf(repos[i].name) >= 0){
+ repos.splice(i,1);
@heptat

heptat Sep 12, 2012

Can't call repos.splice inside of loop through repos.length because splicing (in this case removing an element) changes the length of repos, therefore not all elements will be iterated over.

+ }
+ }
+ }
+
render(options.target, repos);
}
});
View
@@ -62,6 +62,8 @@ github_user:
github_repo_count: 0
github_show_profile_link: true
github_skip_forks: true
+# comma delimited list of repos to be skipped. repo,repo,repo
+github_skip_repos:
# Twitter
twitter_user: