From efc89c8bb5f3abb6656fc42b7f005bffaf10db79 Mon Sep 17 00:00:00 2001 From: Dan Schaefer Date: Sat, 26 Oct 2019 13:15:30 -0400 Subject: [PATCH] Allow someone to exclude repos --- src/github.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/github.js b/src/github.js index 2b72f9a..5387b17 100644 --- a/src/github.js +++ b/src/github.js @@ -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 @@ -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);