1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | var FilterAccountsPlugin = (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 | }());
|
21 | exports.default = FilterAccountsPlugin;
|
22 |
|
\ | No newline at end of file |