Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow someone to exclude repos #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/github.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,7 @@
var html = '';
// Get min of limit of data size
var length = (options.limit < data.length)? options.limit : data.length;
var repo_blacklist = options.repo_blacklist ? options.repo_blacklist : [];

if (length==0) {
// If no activity in last 90 days
Expand All @@ -331,6 +332,11 @@
var activity = data[index];
var payload = activity.payload;

if (repo_blacklist.indexOf(activity.repo.name) != -1) {
// Continue to the next element
continue;
}

// Get attributes common to all activities
activity.timeString = gitMethods.millisecondsToStr(new Date() - new Date(activity.created_at));
activity.userLink = gitMethods.getGitHubLink(activity.actor.login, activity.actor.login);
Expand Down