@@ -274,10 +274,16 @@ const is_pull_request_1 = __nccwpck_require__(5400);
274
274
const operations_1 = __nccwpck_require__(7957);
275
275
class Issue {
276
276
constructor(options, issue) {
277
+ var _a, _b, _c, _d;
277
278
this.operations = new operations_1.Operations();
278
279
this._options = options;
279
280
this.title = issue.title;
280
281
this.number = issue.number;
282
+ //this.user = issue.user;
283
+ this.user = {
284
+ login: (_b = (_a = issue.user) === null || _a === void 0 ? void 0 : _a.login) !== null && _b !== void 0 ? _b : "",
285
+ type: (_d = (_c = issue.user) === null || _c === void 0 ? void 0 : _c.type) !== null && _d !== void 0 ? _d : "User"
286
+ };
281
287
this.created_at = issue.created_at;
282
288
this.updated_at = issue.updated_at;
283
289
this.draft = Boolean(issue.draft);
@@ -561,6 +567,13 @@ class IssuesProcessor {
561
567
IssuesProcessor._endIssueProcessing(issue);
562
568
return; // Don't process exempt issues
563
569
}
570
+ const exemptAuthors = (0, words_to_list_1.wordsToList)(this.options.exemptAuthors);
571
+ const hasExemptAuthors = exemptAuthors.some((exemptAuthor) => issue.user.login == exemptAuthor);
572
+ if (hasExemptAuthors) {
573
+ issueLogger.info(`Skipping this $$type because it contains an exempt author, see ${issueLogger.createOptionLink(option_1.Option.ExemptAuthors)} for more details`);
574
+ IssuesProcessor._endIssueProcessing(issue);
575
+ return; // Don't process exempt issues
576
+ }
564
577
const anyOfLabels = (0, words_to_list_1.wordsToList)(this._getAnyOfLabels(issue));
565
578
if (anyOfLabels.length > 0) {
566
579
issueLogger.info(`The option ${issueLogger.createOptionLink(option_1.Option.AnyOfLabels)} was specified to only process the issues and pull requests with one of those labels (${logger_service_1.LoggerService.cyan(anyOfLabels.length)})`);
@@ -2222,6 +2235,7 @@ var Option;
2222
2235
Option["IgnorePrUpdates"] = "ignore-pr-updates";
2223
2236
Option["ExemptDraftPr"] = "exempt-draft-pr";
2224
2237
Option["CloseIssueReason"] = "close-issue-reason";
2238
+ Option["ExemptAuthors"] = "exempt-authors";
2225
2239
})(Option || (exports.Option = Option = {}));
2226
2240
2227
2241
@@ -2567,7 +2581,8 @@ function _getAndValidateArgs() {
2567
2581
ignorePrUpdates: _toOptionalBoolean('ignore-pr-updates'),
2568
2582
exemptDraftPr: core.getInput('exempt-draft-pr') === 'true',
2569
2583
closeIssueReason: core.getInput('close-issue-reason'),
2570
- includeOnlyAssigned: core.getInput('include-only-assigned') === 'true'
2584
+ includeOnlyAssigned: core.getInput('include-only-assigned') === 'true',
2585
+ exemptAuthors: core.getInput('exempt-authors'),
2571
2586
};
2572
2587
for (const numberInput of ['days-before-stale']) {
2573
2588
if (isNaN(parseFloat(core.getInput(numberInput)))) {
0 commit comments