UNPKG

851 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3var FilterAccountsPlugin = /** @class */ (function () {
4 function FilterAccountsPlugin(options) {
5 this.name = 'Filter Accounts';
6 this.options = Array.isArray(options) ? { accounts: options } : options;
7 }
8 FilterAccountsPlugin.prototype.apply = function (auto) {
9 var _this = this;
10 auto.hooks.onCreateLogParse.tap(this.name, function (logParse) {
11 logParse.hooks.omitCommit.tap(_this.name, function (commit) {
12 if (commit.authorName &&
13 _this.options.accounts.includes(commit.authorName)) {
14 return true;
15 }
16 });
17 });
18 };
19 return FilterAccountsPlugin;
20}());
21exports.default = FilterAccountsPlugin;
22//# sourceMappingURL=index.js.map
\No newline at end of file