Repository: actions/stale
Pull request #300 (2021-02-03 05:03:58)

Bump @octokit/rest from 18.0.12 to 18.1.0
Bumps [@octokit/rest](https://github.com/octokit/rest.js) from 18.0.12 to 18.1.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/octokit/rest.js/releases"><code>@octokit/rest's releases</code></a>.</em></p>
<blockquote>
<h2>v18.1.0</h2>
<h1><a href="https://github.com/octokit/rest.js/compare/v18.0.15...v18.1.0">18.1.0</a> (2021-02-03)</h1>
<h3>Features</h3>
<ul>
<li><code>octokit.interactions.{get,set,remove}RestrictionsForAuthenticatedUser()</code>. Deprecates <code>octokit.interactions.{get,set,remove}RestrictionsForYourPublicRepos</code>.several response type fixes (<a href="https://github-redirect.dependabot.com/octokit/rest.js/issues/1998">#1998</a>) (<a href="https://github.com/octokit/rest.js/commit/8f11742ce047b034bc9e1fbc44185a07516fce2e">8f11742</a>)</li>
</ul>
<h2>v18.0.15</h2>
<h2><a href="https://github.com/octokit/rest.js/compare/v18.0.14...v18.0.15">18.0.15</a> (2021-01-25)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>deps:</strong> lock file maintenance (<a href="https://github.com/octokit/rest.js/commit/41fb0c81d74c382eeb8249f6bc3d13b6f99df423">41fb0c8</a>)</li>
</ul>
<h2>v18.0.14</h2>
<h2><a href="https://github.com/octokit/rest.js/compare/v18.0.13...v18.0.14">18.0.14</a> (2021-01-22)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>deps:</strong> update dependency @octokit/plugin-rest-endpoint-methods to v4.8.0 (<a href="https://github-redirect.dependabot.com/octokit/rest.js/issues/1995">#1995</a>) (<a href="https://github.com/octokit/rest.js/commit/5111e40497763b4a3c1814e6327567de36d33df4">5111e40</a>)</li>
</ul>
<h2>v18.0.13</h2>
<h2><a href="https://github.com/octokit/rest.js/compare/v18.0.12...v18.0.13">18.0.13</a> (2021-01-22)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>deps:</strong> update dependency @octokit/plugin-rest-endpoint-methods to v4.7.0 (<a href="https://github-redirect.dependabot.com/octokit/rest.js/issues/1985">#1985</a>) (<a href="https://github.com/octokit/rest.js/commit/66ea8695f024646102f0c2e7499b2105bf224936">66ea869</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/octokit/rest.js/commit/8f11742ce047b034bc9e1fbc44185a07516fce2e"><code>8f11742</code></a> feat: `octokit.interactions.{get,set,remove}RestrictionsForAuthenticatedUser(...</li>
<li><a href="https://github.com/octokit/rest.js/commit/fc62e6b98625830e1c60ba6c630306468b4c65a9"><code>fc62e6b</code></a> build(deps): lock file maintenance (<a href="https://github-redirect.dependabot.com/octokit/rest.js/issues/2001">#2001</a>)</li>
<li><a href="https://github.com/octokit/rest.js/commit/47fd6a5e2e2905c1dddf3f027eae70962ef8a71c"><code>47fd6a5</code></a> docs(authentication): <code>id</code> -&gt; <code>appId</code> when using <code>@octokit/auth-app</code> (<a href="https://github-redirect.dependabot.com/octokit/rest.js/issues/2005">#2005</a>)</li>
<li><a href="https://github.com/octokit/rest.js/commit/f44457139751594ade408728c159f137fa9851ec"><code>f444571</code></a> docs: Fix broken links in documentation (<a href="https://github-redirect.dependabot.com/octokit/rest.js/issues/2004">#2004</a>) thanks <a href="https://github.com/per1234"><code>@per1234</code></a></li>
<li><a href="https://github.com/octokit/rest.js/commit/b92011384d7ee2c6f068e3ef0a2970c0d1ee6564"><code>b920113</code></a> build(deps): update dependency @octokit/plugin-rest-endpoint-methods to v4.8....</li>
<li><a href="https://github.com/octokit/rest.js/commit/41fb0c81d74c382eeb8249f6bc3d13b6f99df423"><code>41fb0c8</code></a> fix(deps): lock file maintenance</li>
<li><a href="https://github.com/octokit/rest.js/commit/5111e40497763b4a3c1814e6327567de36d33df4"><code>5111e40</code></a> fix(deps): update dependency @octokit/plugin-rest-endpoint-methods to v4.8.0 ...</li>
<li><a href="https://github.com/octokit/rest.js/commit/374e99f5f4c56b1bfd0774cf3b041b748577b422"><code>374e99f</code></a> build(deps): update dependency react-debounce-render to v7</li>
<li><a href="https://github.com/octokit/rest.js/commit/6d8c45634ff53c21ae1566aa2ede77338fc8756b"><code>6d8c456</code></a> build(deps): update dependency typescript to v4</li>
<li><a href="https://github.com/octokit/rest.js/commit/498ab1a523cda6feb5b57958fa4bef6a4e9d956a"><code>498ab1a</code></a> chore(deps): update actions/setup-node action to v2</li>
<li>Additional commits viewable in <a href="https://github.com/octokit/rest.js/compare/v18.0.12...v18.1.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@octokit/rest&package-manager=npm_and_yarn&previous-version=18.0.12&new-version=18.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>


Patch:
diff --git a/CODEOWNERS b/CODEOWNERS
new file mode 100644
index 0000000..992d27f
--- /dev/null
+++ b/CODEOWNERS
@@ -0,0 +1,1 @@
+* @actions/actions-runtime
diff --git a/README.md b/README.md
index 3100c8b..dab01a8 100644
--- a/README.md
+++ b/README.md
@@ -53,6 +53,7 @@ $ npm test
 | `ascending`                 | Order to get issues/pr. _Defaults to **false**_                                              | Optional |
 | `skip-stale-issue-message`  | Skip adding stale message on stale issue. _Defaults to **false**_                            | Optional |
 | `skip-stale-pr-message`     | Skip adding stale message on stale pr. _Defaults to **false**_                               | Optional |
+| `delete-branch`             | Delete the git branch after closing a stale pull request. _Defaults to **false**_            | Optional |
 | `start-date`                | The date used to skip the stale action on issue/pr created before it (ISO 8601 or RFC 2822). | Optional |
 
 ### Usage
diff --git a/dist/index.js b/dist/index.js
index 341822c..cc03880 100644
--- a/dist/index.js
+++ b/dist/index.js
@@ -2,7 +2,43 @@ module.exports =
 /******/ (() => { // webpackBootstrap
 /******/ 	var __webpack_modules__ = ({
 
-/***/ 4407:
+/***/ 4783:
+/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
+
+"use strict";
+
+Object.defineProperty(exports, "__esModule", ({ value: true }));
+exports.Issue = void 0;
+const is_labeled_1 = __nccwpck_require__(6792);
+const is_pull_request_1 = __nccwpck_require__(5400);
+class Issue {
+    constructor(options, issue) {
+        this._options = options;
+        this.title = issue.title;
+        this.number = issue.number;
+        this.created_at = issue.created_at;
+        this.updated_at = issue.updated_at;
+        this.labels = issue.labels;
+        this.pull_request = issue.pull_request;
+        this.state = issue.state;
+        this.locked = issue.locked;
+        this.milestone = issue.milestone;
+        this.isPullRequest = is_pull_request_1.isPullRequest(this);
+        this.staleLabel = this._getStaleLabel();
+        this.isStale = is_labeled_1.isLabeled(this, this.staleLabel);
+    }
+    _getStaleLabel() {
+        return this.isPullRequest
+            ? this._options.stalePrLabel
+            : this._options.staleIssueLabel;
+    }
+}
+exports.Issue = Issue;
+
+
+/***/ }),
+
+/***/ 3292:
 /***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
 
 "use strict";
@@ -17,12 +53,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
     });
 };
 Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.IssueProcessor = void 0;
+exports.IssuesProcessor = void 0;
 const github_1 = __nccwpck_require__(5438);
-const issue_1 = __nccwpck_require__(4783);
-const issue_logger_1 = __nccwpck_require__(2984);
-const logger_1 = __nccwpck_require__(6212);
-const milestones_1 = __nccwpck_require__(4601);
 const get_humanized_date_1 = __nccwpck_require__(965);
 const is_date_more_recent_than_1 = __nccwpck_require__(1473);
 const is_valid_date_1 = __nccwpck_require__(891);
@@ -31,10 +63,14 @@ const is_labeled_1 = __nccwpck_require__(6792);
 const is_pull_request_1 = __nccwpck_require__(5400);
 const should_mark_when_stale_1 = __nccwpck_require__(2461);
 const words_to_list_1 = __nccwpck_require__(1883);
+const issue_1 = __nccwpck_require__(4783);
+const issue_logger_1 = __nccwpck_require__(2984);
+const logger_1 = __nccwpck_require__(6212);
+const milestones_1 = __nccwpck_require__(4601);
 /***
  * Handle processing of issues for staleness/closure.
  */
-class IssueProcessor {
+class IssuesProcessor {
     constructor(options, getActor, getIssues, listIssueComments, getLabelCreationDate) {
         this._logger = new logger_1.Logger();
         this._operationsLeft = 0;
@@ -157,13 +193,16 @@ class IssueProcessor {
                     continue; // don't process exempt milestones
                 }
                 // should this issue be marked stale?
-                const shouldBeStale = !IssueProcessor._updatedSince(issue.updated_at, this.options.daysBeforeStale);
+                const shouldBeStale = !IssuesProcessor._updatedSince(issue.updated_at, daysBeforeStale);
                 // determine if this issue needs to be marked stale first
                 if (!issue.isStale && shouldBeStale && shouldMarkAsStale) {
                     issueLogger.info(`Marking ${issueType} stale because it was last updated on ${issue.updated_at} and it does not have a stale label`);
                     yield this._markStale(issue, staleMessage, staleLabel, skipMessage);
                     issue.isStale = true; // this issue is now considered stale
                 }
+                else if (!issue.isStale) {
+                    issueLogger.info(`Not marking as stale: shouldBeStale=${shouldBeStale}, shouldMarkAsStale=${shouldMarkAsStale}`);
+                }
                 // process the issue if it was marked stale
                 if (issue.isStale) {
                     issueLogger.info(`Found a stale ${issueType}`);
@@ -196,7 +235,7 @@ class IssueProcessor {
             else {
                 issueLogger.info(`Days before issue close: ${daysBeforeClose}`);
             }
-            const issueHasUpdate = IssueProcessor._updatedSince(issue.updated_at, daysBeforeClose);
+            const issueHasUpdate = IssuesProcessor._updatedSince(issue.updated_at, daysBeforeClose);
             issueLogger.info(`Issue #${issue.number} has been updated: ${issueHasUpdate}`);
             // should we un-stale this issue?
             if (this.options.removeStaleWhenUpdated && issueHasComments) {
@@ -500,43 +539,7 @@ class IssueProcessor {
         });
     }
 }
-exports.IssueProcessor = IssueProcessor;
-
-
-/***/ }),
-
-/***/ 4783:
-/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => {
-
-"use strict";
-
-Object.defineProperty(exports, "__esModule", ({ value: true }));
-exports.Issue = void 0;
-const is_labeled_1 = __nccwpck_require__(6792);
-const is_pull_request_1 = __nccwpck_require__(5400);
-class Issue {
-    constructor(options, issue) {
-        this._options = options;
-        this.title = issue.title;
-        this.number = issue.number;
-        this.created_at = issue.created_at;
-        this.updated_at = issue.updated_at;
-        this.labels = issue.labels;
-        this.pull_request = issue.pull_request;
-        this.state = issue.state;
-        this.locked = issue.locked;
-        this.milestone = issue.milestone;
-        this.isPullRequest = is_pull_request_1.isPullRequest(this);
-        this.staleLabel = this._getStaleLabel();
-        this.isStale = is_labeled_1.isLabeled(this, this.staleLabel);
-    }
-    _getStaleLabel() {
-        return this.isPullRequest
-            ? this._options.stalePrLabel
-            : this._options.staleIssueLabel;
-    }
-}
-exports.Issue = Issue;
+exports.IssuesProcessor = IssuesProcessor;
 
 
 /***/ }),
@@ -921,12 +924,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
 Object.defineProperty(exports, "__esModule", ({ value: true }));
 const core = __importStar(__nccwpck_require__(2186));
 const is_valid_date_1 = __nccwpck_require__(891);
-const IssueProcessor_1 = __nccwpck_require__(4407);
+const issues_processor_1 = __nccwpck_require__(3292);
 function run() {
     return __awaiter(this, void 0, void 0, function* () {
         try {
             const args = getAndValidateArgs();
-            const processor = new IssueProcessor_1.IssueProcessor(args);
+            const processor = new issues_processor_1.IssuesProcessor(args);
             yield processor.processIssues();
         }
         catch (error) {
diff --git a/package-lock.json b/package-lock.json
index 62c6ae0..6b50115 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1568,9 +1568,9 @@
       }
     },
     "@octokit/openapi-types": {
-      "version": "2.3.0",
-      "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-2.3.0.tgz",
-      "integrity": "sha512-Own8lHWVi5eEfLOnsIzAx16BoRbpkzac3QDUCxIqYMf4bjz+AGpv17UfRn1Va4lVmjwOpvZglpFI3mmxuQ+sIQ=="
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-4.0.0.tgz",
+      "integrity": "sha512-o4Q9VPYaIdzxskfVuWk7Dcb6Ldq2xbd1QKmPCRx29nFdFxm+2Py74QLfbB3CgankZerHnNJ9wgINOkwa/O2qRg=="
     },
     "@octokit/plugin-paginate-rest": {
       "version": "2.2.4",
@@ -1581,9 +1581,9 @@
       }
     },
     "@octokit/plugin-request-log": {
-      "version": "1.0.2",
-      "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.2.tgz",
-      "integrity": "sha512-oTJSNAmBqyDR41uSMunLQKMX0jmEXbwD1fpz8FG27lScV3RhtGfBa1/BBLym+PxcC16IBlF7KH9vP1BUYxA+Eg=="
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.3.tgz",
+      "integrity": "sha512-4RFU4li238jMJAzLgAwkBAw+4Loile5haQMQr+uhFq27BmyJXcXSKvoQKqh0agsZEiUlW6iSv3FAgvmGkur7OQ=="
     },
     "@octokit/plugin-rest-endpoint-methods": {
       "version": "4.1.2",
@@ -1620,28 +1620,28 @@
       }
     },
     "@octokit/rest": {
-      "version": "18.0.12",
-      "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-18.0.12.tgz",
-      "integrity": "sha512-hNRCZfKPpeaIjOVuNJzkEL6zacfZlBPV8vw8ReNeyUkVvbuCvvrrx8K8Gw2eyHHsmd4dPlAxIXIZ9oHhJfkJpw==",
+      "version": "18.1.0",
+      "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-18.1.0.tgz",
+      "integrity": "sha512-YQfpTzWV3jdzDPyXQVO54f5I2t1zxk/S53Vbe+Aa5vQj6MdTx6sNEWzmUzUO8lSVowbGOnjcQHzW1A8ATr+/7g==",
       "requires": {
         "@octokit/core": "^3.2.3",
         "@octokit/plugin-paginate-rest": "^2.6.2",
         "@octokit/plugin-request-log": "^1.0.2",
-        "@octokit/plugin-rest-endpoint-methods": "4.4.1"
+        "@octokit/plugin-rest-endpoint-methods": "4.10.1"
       },
       "dependencies": {
         "@octokit/auth-token": {
-          "version": "2.4.4",
-          "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.4.tgz",
-          "integrity": "sha512-LNfGu3Ro9uFAYh10MUZVaT7X2CnNm2C8IDQmabx+3DygYIQjs9FwzFAHN/0t6mu5HEPhxcb1XOuxdpY82vCg2Q==",
+          "version": "2.4.5",
+          "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.5.tgz",
+          "integrity": "sha512-BpGYsPgJt05M7/L/5FoE1PiAbdxXFZkX/3kDYcsvd1v6UhlnE5e96dTDr0ezX/EFwciQxf3cNV0loipsURU+WA==",
           "requires": {
-            "@octokit/types": "^6.0.0"
+            "@octokit/types": "^6.0.3"
           }
         },
         "@octokit/core": {
-          "version": "3.2.4",
-          "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.2.4.tgz",
-          "integrity": "sha512-d9dTsqdePBqOn7aGkyRFe7pQpCXdibSJ5SFnrTr0axevObZrpz3qkWm7t/NjYv5a66z6vhfteriaq4FRz3e0Qg==",
+          "version": "3.2.5",
+          "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.2.5.tgz",
+          "integrity": "sha512-+DCtPykGnvXKWWQI0E1XD+CCeWSBhB6kwItXqfFmNBlIlhczuDPbg+P6BtLnVBaRJDAjv+1mrUJuRsFSjktopg==",
           "requires": {
             "@octokit/auth-token": "^2.4.4",
             "@octokit/graphql": "^4.5.8",
@@ -1652,40 +1652,40 @@
           }
         },
         "@octokit/graphql": {
-          "version": "4.5.8",
-          "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.5.8.tgz",
-          "integrity": "sha512-WnCtNXWOrupfPJgXe+vSmprZJUr0VIu14G58PMlkWGj3cH+KLZEfKMmbUQ6C3Wwx6fdhzVW1CD5RTnBdUHxhhA==",
+          "version": "4.6.0",
+          "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.6.0.tgz",
+          "integrity": "sha512-CJ6n7izLFXLvPZaWzCQDjU/RP+vHiZmWdOunaCS87v+2jxMsW9FB5ktfIxybRBxZjxuJGRnxk7xJecWTVxFUYQ==",
           "requires": {
             "@octokit/request": "^5.3.0",
-            "@octokit/types": "^6.0.0",
+            "@octokit/types": "^6.0.3",
             "universal-user-agent": "^6.0.0"
           }
         },
         "@octokit/plugin-paginate-rest": {
-          "version": "2.7.1",
-          "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.7.1.tgz",
-          "integrity": "sha512-dUsxsEIrBqhlQNfXRhMhXOTQi0SSG38+QWcPGO226HFPFJk44vWukegHfMG3496vLv9T2oT7IuAGssGpcUg5bQ==",
+          "version": "2.9.1",
+          "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.9.1.tgz",
+          "integrity": "sha512-8wnuWGjwDIEobbBet2xAjZwgiMVTgIer5wBsnGXzV3lJ4yqphLU2FEMpkhSrDx7y+WkZDfZ+V+1cFMZ1mAaFag==",
           "requires": {
-            "@octokit/types": "^6.3.1"
+            "@octokit/types": "^6.8.0"
           }
         },
         "@octokit/plugin-rest-endpoint-methods": {
-          "version": "4.4.1",
-          "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.4.1.tgz",
-          "integrity": "sha512-+v5PcvrUcDeFXf8hv1gnNvNLdm4C0+2EiuWt9EatjjUmfriM1pTMM+r4j1lLHxeBQ9bVDmbywb11e3KjuavieA==",
+          "version": "4.10.1",
+          "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.10.1.tgz",
+          "integrity": "sha512-YGMiEidTORzgUmYZu0eH4q2k8kgQSHQMuBOBYiKxUYs/nXea4q/Ze6tDzjcRAPmHNJYXrENs1bEMlcdGKT+8ug==",
           "requires": {
-            "@octokit/types": "^6.1.0",
+            "@octokit/types": "^6.8.2",
             "deprecation": "^2.3.1"
           }
         },
         "@octokit/request": {
-          "version": "5.4.12",
-          "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.4.12.tgz",
-          "integrity": "sha512-MvWYdxengUWTGFpfpefBBpVmmEYfkwMoxonIB3sUGp5rhdgwjXL1ejo6JbgzG/QD9B/NYt/9cJX1pxXeSIUCkg==",
+          "version": "5.4.14",
+          "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.4.14.tgz",
+          "integrity": "sha512-VkmtacOIQp9daSnBmDI92xNIeLuSRDOIuplp/CJomkvzt7M18NXgG044Cx/LFKLgjKt9T2tZR6AtJayba9GTSA==",
           "requires": {
             "@octokit/endpoint": "^6.0.1",
             "@octokit/request-error": "^2.0.0",
-            "@octokit/types": "^6.0.3",
+            "@octokit/types": "^6.7.1",
             "deprecation": "^2.0.0",
             "is-plain-object": "^5.0.0",
             "node-fetch": "^2.6.1",
@@ -1694,11 +1694,11 @@
           }
         },
         "@octokit/types": {
-          "version": "6.3.1",
-          "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.3.1.tgz",
-          "integrity": "sha512-SyOaprLWVPS6QhbZY8hF9Oydx/UUnslKq1NyNUr4CN42UEPC3+9AvrYrDm4UvaU1D5u/vVMuSZOicFqOielRXQ==",
+          "version": "6.8.2",
+          "resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.8.2.tgz",
+          "integrity": "sha512-RpG0NJd7OKSkWptiFhy1xCLkThs5YoDIKM21lEtDmUvSpbaIEfrxzckWLUGDFfF8RydSyngo44gDv8m2hHruUg==",
           "requires": {
-            "@octokit/openapi-types": "^2.3.0",
+            "@octokit/openapi-types": "^4.0.0",
             "@types/node": ">= 8"
           }
         },
@@ -3161,9 +3161,9 @@
       }
     },
     "eslint": {
-      "version": "7.18.0",
-      "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.18.0.tgz",
-      "integrity": "sha512-fbgTiE8BfUJZuBeq2Yi7J3RB3WGUQ9PNuNbmgi6jt9Iv8qrkxfy19Ds3OpL1Pm7zg3BtTVhvcUZbIRQ0wmSjAQ==",
+      "version": "7.19.0",
+      "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.19.0.tgz",
+      "integrity": "sha512-CGlMgJY56JZ9ZSYhJuhow61lMPPjUzWmChFya71Z/jilVos7mR/jPgaEfVGgMBY5DshbKdG8Ezb8FDCHcoMEMg==",
       "dev": true,
       "requires": {
         "@babel/code-frame": "^7.0.0",
@@ -4080,9 +4080,9 @@
       }
     },
     "flatted": {
-      "version": "3.1.0",
-      "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.0.tgz",
-      "integrity": "sha512-tW+UkmtNg/jv9CSofAKvgVcO7c2URjhTdW1ZTkcAritblu8tajiYy7YisnIflEwtKssCtOxpnBRoCB7iap0/TA==",
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz",
+      "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==",
       "dev": true
     },
     "for-in": {
diff --git a/package.json b/package.json
index 62c28c3..929ce26 100644
--- a/package.json
+++ b/package.json
@@ -30,7 +30,7 @@
   "dependencies": {
     "@actions/core": "^1.2.6",
     "@actions/github": "^4.0.0",
-    "@octokit/rest": "^18.0.12",
+    "@octokit/rest": "^18.1.0",
     "lodash.deburr": "^4.1.0",
     "semver": "^7.3.4"
   },
@@ -42,7 +42,7 @@
     "@typescript-eslint/eslint-plugin": "^4.14.0",
     "@typescript-eslint/parser": "^4.14.0",
     "@vercel/ncc": "^0.27.0",
-    "eslint": "^7.18.0",
+    "eslint": "^7.19.0",
     "eslint-plugin-github": "^4.0.1",
     "eslint-plugin-jest": "^24.1.3",
     "jest": "^26.6.3",
diff --git a/src/classes/issue.spec.ts b/src/classes/issue.spec.ts
index 0b395cf..949211d 100644
--- a/src/classes/issue.spec.ts
+++ b/src/classes/issue.spec.ts
@@ -1,11 +1,12 @@
 import {IIssue} from '../interfaces/issue';
+import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options';
+import {ILabel} from '../interfaces/label';
 import {IMilestone} from '../interfaces/milestone';
-import {IssueProcessorOptions, Label} from '../IssueProcessor';
 import {Issue} from './issue';
 
 describe('Issue', (): void => {
   let issue: Issue;
-  let optionsInterface: IssueProcessorOptions;
+  let optionsInterface: IIssuesProcessorOptions;
   let issueInterface: IIssue;
 
   beforeEach((): void => {
@@ -91,7 +92,7 @@ describe('Issue', (): void => {
       expect(issue.labels).toStrictEqual([
         {
           name: 'dummy-name'
-        } as Label
+        } as ILabel
       ]);
     });
 
@@ -193,7 +194,7 @@ describe('Issue', (): void => {
         issueInterface.labels = [
           {
             name: 'dummy-stale-issue-label'
-          } as Label
+          } as ILabel
         ];
         issue = new Issue(optionsInterface, issueInterface);
       });
diff --git a/src/classes/issue.ts b/src/classes/issue.ts
index 31a40c7..af6f825 100644
--- a/src/classes/issue.ts
+++ b/src/classes/issue.ts
@@ -1,17 +1,18 @@
 import {isLabeled} from '../functions/is-labeled';
 import {isPullRequest} from '../functions/is-pull-request';
 import {IIssue} from '../interfaces/issue';
+import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options';
+import {ILabel} from '../interfaces/label';
 import {IMilestone} from '../interfaces/milestone';
-import {IssueProcessorOptions, Label} from '../IssueProcessor';
 import {IsoDateString} from '../types/iso-date-string';
 
 export class Issue implements IIssue {
-  private readonly _options: IssueProcessorOptions;
+  private readonly _options: IIssuesProcessorOptions;
   readonly title: string;
   readonly number: number;
   created_at: IsoDateString;
   updated_at: IsoDateString;
-  readonly labels: Label[];
+  readonly labels: ILabel[];
   readonly pull_request: Object | null | undefined;
   readonly state: string;
   readonly locked: boolean;
@@ -21,7 +22,7 @@ export class Issue implements IIssue {
   isStale: boolean;
 
   constructor(
-    options: Readonly<IssueProcessorOptions>,
+    options: Readonly<IIssuesProcessorOptions>,
     issue: Readonly<IIssue>
   ) {
     this._options = options;
diff --git a/src/IssueProcessor.ts b/src/classes/issues-processor.ts
similarity index 88%
rename from src/IssueProcessor.ts
rename to src/classes/issues-processor.ts
index f1c2d93..f6c86bd 100644
--- a/src/IssueProcessor.ts
+++ b/src/classes/issues-processor.ts
@@ -1,84 +1,29 @@
 import {context, getOctokit} from '@actions/github';
 import {GitHub} from '@actions/github/lib/utils';
 import {GetResponseTypeFromEndpointMethod} from '@octokit/types';
-import {Issue} from './classes/issue';
-import {IssueLogger} from './classes/loggers/issue-logger';
-import {Logger} from './classes/loggers/logger';
-import {Milestones} from './classes/milestones';
-import {IssueType} from './enums/issue-type';
-import {getHumanizedDate} from './functions/dates/get-humanized-date';
-import {isDateMoreRecentThan} from './functions/dates/is-date-more-recent-than';
-import {isValidDate} from './functions/dates/is-valid-date';
-import {getIssueType} from './functions/get-issue-type';
-import {isLabeled} from './functions/is-labeled';
-import {isPullRequest} from './functions/is-pull-request';
-import {shouldMarkWhenStale} from './functions/should-mark-when-stale';
-import {IsoOrRfcDateString} from './types/iso-or-rfc-date-string';
-import {wordsToList} from './functions/words-to-list';
-import {IIssue} from './interfaces/issue';
-
-export interface PullRequest {
-  number: number;
-  head: {
-    ref: string;
-  };
-}
-
-export interface User {
-  type: string;
-  login: string;
-}
-
-export interface Comment {
-  user: User;
-}
-
-export interface IssueEvent {
-  created_at: string;
-  event: string;
-  label: Label;
-}
-
-export interface Label {
-  name: string;
-}
-
-export interface IssueProcessorOptions {
-  repoToken: string;
-  staleIssueMessage: string;
-  stalePrMessage: string;
-  closeIssueMessage: string;
-  closePrMessage: string;
-  daysBeforeStale: number;
-  daysBeforeIssueStale: number; // Could be NaN
-  daysBeforePrStale: number; // Could be NaN
-  daysBeforeClose: number;
-  daysBeforeIssueClose: number; // Could be NaN
-  daysBeforePrClose: number; // Could be NaN
-  staleIssueLabel: string;
-  closeIssueLabel: string;
-  exemptIssueLabels: string;
-  stalePrLabel: string;
-  closePrLabel: string;
-  exemptPrLabels: string;
-  onlyLabels: string;
-  operationsPerRun: number;
-  removeStaleWhenUpdated: boolean;
-  debugOnly: boolean;
-  ascending: boolean;
-  skipStaleIssueMessage: boolean;
-  skipStalePrMessage: boolean;
-  deleteBranch: boolean;
-  startDate: IsoOrRfcDateString | undefined; // Should be ISO 8601 or RFC 2822
-  exemptMilestones: string;
-  exemptIssueMilestones: string;
-  exemptPrMilestones: string;
-}
+import {IssueType} from '../enums/issue-type';
+import {getHumanizedDate} from '../functions/dates/get-humanized-date';
+import {isDateMoreRecentThan} from '../functions/dates/is-date-more-recent-than';
+import {isValidDate} from '../functions/dates/is-valid-date';
+import {getIssueType} from '../functions/get-issue-type';
+import {isLabeled} from '../functions/is-labeled';
+import {isPullRequest} from '../functions/is-pull-request';
+import {shouldMarkWhenStale} from '../functions/should-mark-when-stale';
+import {wordsToList} from '../functions/words-to-list';
+import {IComment} from '../interfaces/comment';
+import {IIssue} from '../interfaces/issue';
+import {IIssueEvent} from '../interfaces/issue-event';
+import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options';
+import {IPullRequest} from '../interfaces/pull-request';
+import {Issue} from './issue';
+import {IssueLogger} from './loggers/issue-logger';
+import {Logger} from './loggers/logger';
+import {Milestones} from './milestones';
 
 /***
  * Handle processing of issues for staleness/closure.
  */
-export class IssueProcessor {
+export class IssuesProcessor {
   private static _updatedSince(timestamp: string, num_days: number): boolean {
     const daysInMillis = 1000 * 60 * 60 * 24 * num_days;
     const millisSinceLastUpdated =
@@ -90,20 +35,20 @@ export class IssueProcessor {
   private readonly _logger: Logger = new Logger();
   private _operationsLeft = 0;
   readonly client: InstanceType<typeof GitHub>;
-  readonly options: IssueProcessorOptions;
+  readonly options: IIssuesProcessorOptions;
   readonly staleIssues: Issue[] = [];
   readonly closedIssues: Issue[] = [];
   readonly deletedBranchIssues: Issue[] = [];
   readonly removedLabelIssues: Issue[] = [];
 
   constructor(
-    options: IssueProcessorOptions,
+    options: IIssuesProcessorOptions,
     getActor?: () => Promise<string>,
     getIssues?: (page: number) => Promise<Issue[]>,
     listIssueComments?: (
       issueNumber: number,
       sinceDate: string
-    ) => Promise<Comment[]>,
+    ) => Promise<IComment[]>,
     getLabelCreationDate?: (
       issue: Issue,
       label: string
@@ -271,9 +216,9 @@ export class IssueProcessor {
       }
 
       // should this issue be marked stale?
-      const shouldBeStale = !IssueProcessor._updatedSince(
+      const shouldBeStale = !IssuesProcessor._updatedSince(
         issue.updated_at,
-        this.options.daysBeforeStale
+        daysBeforeStale
       );
 
       // determine if this issue needs to be marked stale first
@@ -283,6 +228,10 @@ export class IssueProcessor {
         );
         await this._markStale(issue, staleMessage, staleLabel, skipMessage);
         issue.isStale = true; // this issue is now considered stale
+      } else if (!issue.isStale) {
+        issueLogger.info(
+          `Not marking as stale: shouldBeStale=${shouldBeStale}, shouldMarkAsStale=${shouldMarkAsStale}`
+        );
       }
 
       // process the issue if it was marked stale
@@ -346,7 +295,7 @@ export class IssueProcessor {
       issueLogger.info(`Days before issue close: ${daysBeforeClose}`);
     }
 
-    const issueHasUpdate: boolean = IssueProcessor._updatedSince(
+    const issueHasUpdate: boolean = IssuesProcessor._updatedSince(
       issue.updated_at,
       daysBeforeClose
     );
@@ -419,7 +368,7 @@ export class IssueProcessor {
   private async _listIssueComments(
     issueNumber: number,
     sinceDate: string
-  ): Promise<Comment[]> {
+  ): Promise<IComment[]> {
     // find any comments since date on the given issue
     try {
       const comments = await this.client.issues.listComments({
@@ -582,7 +531,7 @@ export class IssueProcessor {
 
   private async _getPullRequest(
     issue: Issue
-  ): Promise<PullRequest | undefined> {
+  ): Promise<IPullRequest | undefined> {
     const issueLogger: IssueLogger = new IssueLogger(issue);
     this._operationsLeft -= 1;
 
@@ -688,7 +637,7 @@ export class IssueProcessor {
       issue_number: issue.number
     });
 
-    const events: IssueEvent[] = await this.client.paginate(options);
+    const events: IIssueEvent[] = await this.client.paginate(options);
     const reversedEvents = events.reverse();
 
     const staleLabeledEvent = reversedEvents.find(
diff --git a/src/classes/milestones.spec.ts b/src/classes/milestones.spec.ts
index 032c161..4703a7f 100644
--- a/src/classes/milestones.spec.ts
+++ b/src/classes/milestones.spec.ts
@@ -1,11 +1,11 @@
 import {IIssue} from '../interfaces/issue';
-import {IssueProcessorOptions} from '../IssueProcessor';
+import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options';
 import {Issue} from './issue';
 import {Milestones} from './milestones';
 
 describe('Milestones', (): void => {
   let milestones: Milestones;
-  let optionsInterface: IssueProcessorOptions;
+  let optionsInterface: IIssuesProcessorOptions;
   let issue: Issue;
   let issueInterface: IIssue;
 
diff --git a/src/classes/milestones.ts b/src/classes/milestones.ts
index 99b2cce..b208c85 100644
--- a/src/classes/milestones.ts
+++ b/src/classes/milestones.ts
@@ -1,6 +1,6 @@
 import deburr from 'lodash.deburr';
 import {wordsToList} from '../functions/words-to-list';
-import {IssueProcessorOptions} from '../IssueProcessor';
+import {IIssuesProcessorOptions} from '../interfaces/issues-processor-options';
 import {Issue} from './issue';
 
 type CleanMilestone = string;
@@ -10,10 +10,10 @@ export class Milestones {
     return deburr(label.toLowerCase());
   }
 
-  private readonly _options: IssueProcessorOptions;
+  private readonly _options: IIssuesProcessorOptions;
   private readonly _issue: Issue;
 
-  constructor(options: Readonly<IssueProcessorOptions>, issue: Issue) {
+  constructor(options: Readonly<IIssuesProcessorOptions>, issue: Issue) {
     this._options = options;
     this._issue = issue;
   }
diff --git a/src/functions/is-labeled.ts b/src/functions/is-labeled.ts
index 791cd0a..890de3a 100644
--- a/src/functions/is-labeled.ts
+++ b/src/functions/is-labeled.ts
@@ -1,6 +1,6 @@
 import deburr from 'lodash.deburr';
 import {Issue} from '../classes/issue';
-import {Label} from '../IssueProcessor';
+import {ILabel} from '../interfaces/label';
 import {CleanLabel} from '../types/clean-label';
 
 /**
@@ -16,7 +16,7 @@ export function isLabeled(
   issue: Readonly<Issue>,
   label: Readonly<string>
 ): boolean {
-  return !!issue.labels.find((issueLabel: Readonly<Label>): boolean => {
+  return !!issue.labels.find((issueLabel: Readonly<ILabel>): boolean => {
     return cleanLabel(label) === cleanLabel(issueLabel.name);
   });
 }
diff --git a/src/interfaces/comment.ts b/src/interfaces/comment.ts
new file mode 100644
index 0000000..33196f6
--- /dev/null
+++ b/src/interfaces/comment.ts
@@ -0,0 +1,5 @@
+import {IUser} from './user';
+
+export interface IComment {
+  user: IUser;
+}
diff --git a/src/interfaces/issue-event.ts b/src/interfaces/issue-event.ts
new file mode 100644
index 0000000..427943a
--- /dev/null
+++ b/src/interfaces/issue-event.ts
@@ -0,0 +1,7 @@
+import {ILabel} from './label';
+
+export interface IIssueEvent {
+  created_at: string;
+  event: string;
+  label: ILabel;
+}
diff --git a/src/interfaces/issue.ts b/src/interfaces/issue.ts
index 9ee7ce8..0df42eb 100644
--- a/src/interfaces/issue.ts
+++ b/src/interfaces/issue.ts
@@ -1,5 +1,5 @@
-import {Label} from '../IssueProcessor';
 import {IsoDateString} from '../types/iso-date-string';
+import {ILabel} from './label';
 import {IMilestone} from './milestone';
 
 export interface IIssue {
@@ -7,7 +7,7 @@ export interface IIssue {
   number: number;
   created_at: IsoDateString;
   updated_at: IsoDateString;
-  labels: Label[];
+  labels: ILabel[];
   pull_request: Object | null | undefined;
   state: string;
   locked: boolean;
diff --git a/src/interfaces/issues-processor-options.ts b/src/interfaces/issues-processor-options.ts
new file mode 100644
index 0000000..11253c9
--- /dev/null
+++ b/src/interfaces/issues-processor-options.ts
@@ -0,0 +1,33 @@
+import {IsoOrRfcDateString} from '../types/iso-or-rfc-date-string';
+
+export interface IIssuesProcessorOptions {
+  repoToken: string;
+  staleIssueMessage: string;
+  stalePrMessage: string;
+  closeIssueMessage: string;
+  closePrMessage: string;
+  daysBeforeStale: number;
+  daysBeforeIssueStale: number; // Could be NaN
+  daysBeforePrStale: number; // Could be NaN
+  daysBeforeClose: number;
+  daysBeforeIssueClose: number; // Could be NaN
+  daysBeforePrClose: number; // Could be NaN
+  staleIssueLabel: string;
+  closeIssueLabel: string;
+  exemptIssueLabels: string;
+  stalePrLabel: string;
+  closePrLabel: string;
+  exemptPrLabels: string;
+  onlyLabels: string;
+  operationsPerRun: number;
+  removeStaleWhenUpdated: boolean;
+  debugOnly: boolean;
+  ascending: boolean;
+  skipStaleIssueMessage: boolean;
+  skipStalePrMessage: boolean;
+  deleteBranch: boolean;
+  startDate: IsoOrRfcDateString | undefined; // Should be ISO 8601 or RFC 2822
+  exemptMilestones: string;
+  exemptIssueMilestones: string;
+  exemptPrMilestones: string;
+}
diff --git a/src/interfaces/label.ts b/src/interfaces/label.ts
new file mode 100644
index 0000000..26ec965
--- /dev/null
+++ b/src/interfaces/label.ts
@@ -0,0 +1,3 @@
+export interface ILabel {
+  name: string;
+}
diff --git a/src/interfaces/pull-request.ts b/src/interfaces/pull-request.ts
new file mode 100644
index 0000000..9f13005
--- /dev/null
+++ b/src/interfaces/pull-request.ts
@@ -0,0 +1,6 @@
+export interface IPullRequest {
+  number: number;
+  head: {
+    ref: string;
+  };
+}
diff --git a/src/interfaces/user.ts b/src/interfaces/user.ts
new file mode 100644
index 0000000..2394d4d
--- /dev/null
+++ b/src/interfaces/user.ts
@@ -0,0 +1,4 @@
+export interface IUser {
+  type: string;
+  login: string;
+}
diff --git a/src/main.ts b/src/main.ts
index 31a492e..130d1b0 100644
--- a/src/main.ts
+++ b/src/main.ts
@@ -1,12 +1,13 @@
 import * as core from '@actions/core';
 import {isValidDate} from './functions/dates/is-valid-date';
-import {IssueProcessor, IssueProcessorOptions} from './IssueProcessor';
+import {IssuesProcessor} from './classes/issues-processor';
+import {IIssuesProcessorOptions} from './interfaces/issues-processor-options';
 
 async function run(): Promise<void> {
   try {
     const args = getAndValidateArgs();
 
-    const processor: IssueProcessor = new IssueProcessor(args);
+    const processor: IssuesProcessor = new IssuesProcessor(args);
     await processor.processIssues();
   } catch (error) {
     core.error(error);
@@ -14,8 +15,8 @@ async function run(): Promise<void> {
   }
 }
 
-function getAndValidateArgs(): IssueProcessorOptions {
-  const args: IssueProcessorOptions = {
+function getAndValidateArgs(): IIssuesProcessorOptions {
+  const args: IIssuesProcessorOptions = {
     repoToken: core.getInput('repo-token'),
     staleIssueMessage: core.getInput('stale-issue-message'),
     stalePrMessage: core.getInput('stale-pr-message'),


Test patch:
diff --git a/__tests__/main.test.ts b/__tests__/main.test.ts
index aad95e5..2d38793 100644
--- a/__tests__/main.test.ts
+++ b/__tests__/main.test.ts
@@ -1,19 +1,20 @@
 import * as github from '@actions/github';
 import {Issue} from '../src/classes/issue';
 
-import {IssueProcessor, IssueProcessorOptions} from '../src/IssueProcessor';
+import {IssuesProcessor} from '../src/classes/issues-processor';
+import {IIssuesProcessorOptions} from '../src/interfaces/issues-processor-options';
 import {IsoDateString} from '../src/types/iso-date-string';
 
 function generateIssue(
-  options: IssueProcessorOptions,
+  options: IIssuesProcessorOptions,
   id: number,
   title: string,
   updatedAt: IsoDateString,
   createdAt: IsoDateString = updatedAt,
-  isPullRequest: boolean = false,
+  isPullRequest = false,
   labels: string[] = [],
-  isClosed: boolean = false,
-  isLocked: boolean = false,
+  isClosed = false,
+  isLocked = false,
   milestone = ''
 ): Issue {
   return new Issue(options, {
@@ -21,7 +22,7 @@ function generateIssue(
     labels: labels.map(l => {
       return {name: l};
     }),
-    title: title,
+    title,
     created_at: createdAt,
     updated_at: updatedAt,
     pull_request: isPullRequest ? {} : null,
@@ -33,7 +34,7 @@ function generateIssue(
   });
 }
 
-const DefaultProcessorOptions: IssueProcessorOptions = Object.freeze({
+const DefaultProcessorOptions: IIssuesProcessorOptions = Object.freeze({
   repoToken: 'none',
   staleIssueMessage: 'This issue is stale',
   stalePrMessage: 'This PR is stale',
@@ -66,7 +67,7 @@ const DefaultProcessorOptions: IssueProcessorOptions = Object.freeze({
 });
 
 test('empty issue list results in 1 operation', async () => {
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     DefaultProcessorOptions,
     async () => 'abot',
     async () => [],
@@ -82,14 +83,14 @@ test('empty issue list results in 1 operation', async () => {
 });
 
 test('processing an issue with no label will make it stale and close it, if it is old enough only if days-before-close is set to 0', async () => {
-  const opts: IssueProcessorOptions = {
+  const opts: IIssuesProcessorOptions = {
     ...DefaultProcessorOptions,
     daysBeforeClose: 0
   };
   const TestIssueList: Issue[] = [
     generateIssue(opts, 1, 'An issue with no label', '2020-01-01T17:00:00Z')
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -107,7 +108,7 @@ test('processing an issue with no label will make it stale and close it, if it i
 test('processing an issue with no label and a start date as ECMAScript epoch in seconds being before the issue creation date will not make it stale nor close it when it is old enough and days-before-close is set to 0', async () => {
   expect.assertions(2);
   const january2000 = 946681200000;
-  const opts: IssueProcessorOptions = {
+  const opts: IIssuesProcessorOptions = {
     ...DefaultProcessorOptions,
     daysBeforeClose: 0,
     startDate: january2000.toString()
@@ -121,7 +122,7 @@ test('processing an issue with no label and a start date as ECMAScript epoch in
       '2020-01-01T17:00:00Z'
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -139,7 +140,7 @@ test('processing an issue with no label and a start date as ECMAScript epoch in
 test('processing an issue with no label and a start date as ECMAScript epoch in seconds being after the issue creation date will not make it stale nor close it when it is old enough and days-before-close is set to 0', async () => {
   expect.assertions(2);
   const january2021 = 1609455600000;
-  const opts: IssueProcessorOptions = {
+  const opts: IIssuesProcessorOptions = {
     ...DefaultProcessorOptions,
     daysBeforeClose: 0,
     startDate: january2021.toString()
@@ -153,7 +154,7 @@ test('processing an issue with no label and a start date as ECMAScript epoch in
       '2020-01-01T17:00:00Z'
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -171,7 +172,7 @@ test('processing an issue with no label and a start date as ECMAScript epoch in
 test('processing an issue with no label and a start date as ECMAScript epoch in milliseconds being before the issue creation date will not make it stale nor close it when it is old enough and days-before-close is set to 0', async () => {
   expect.assertions(2);
   const january2000 = 946681200000000;
-  const opts: IssueProcessorOptions = {
+  const opts: IIssuesProcessorOptions = {
     ...DefaultProcessorOptions,
     daysBeforeClose: 0,
     startDate: january2000.toString()
@@ -185,7 +186,7 @@ test('processing an issue with no label and a start date as ECMAScript epoch in
       '2020-01-01T17:00:00Z'
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -203,7 +204,7 @@ test('processing an issue with no label and a start date as ECMAScript epoch in
 test('processing an issue with no label and a start date as ECMAScript epoch in milliseconds being after the issue creation date will not make it stale nor close it when it is old enough and days-before-close is set to 0', async () => {
   expect.assertions(2);
   const january2021 = 1609455600000;
-  const opts: IssueProcessorOptions = {
+  const opts: IIssuesProcessorOptions = {
     ...DefaultProcessorOptions,
     daysBeforeClose: 0,
     startDate: january2021.toString()
@@ -217,7 +218,7 @@ test('processing an issue with no label and a start date as ECMAScript epoch in
       '2020-01-01T17:00:00Z'
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -235,7 +236,7 @@ test('processing an issue with no label and a start date as ECMAScript epoch in
 test('processing an issue with no label and a start date as ISO 8601 being before the issue creation date will make it stale and close it when it is old enough and days-before-close is set to 0', async () => {
   expect.assertions(2);
   const january2000 = '2000-01-01T00:00:00Z';
-  const opts: IssueProcessorOptions = {
+  const opts: IIssuesProcessorOptions = {
     ...DefaultProcessorOptions,
     daysBeforeClose: 0,
     startDate: january2000.toString()
@@ -249,7 +250,7 @@ test('processing an issue with no label and a start date as ISO 8601 being befor
       '2020-01-01T17:00:00Z'
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -267,7 +268,7 @@ test('processing an issue with no label and a start date as ISO 8601 being befor
 test('processing an issue with no label and a start date as ISO 8601 being after the issue creation date will not make it stale nor close it when it is old enough and days-before-close is set to 0', async () => {
   expect.assertions(2);
   const january2021 = '2021-01-01T00:00:00Z';
-  const opts: IssueProcessorOptions = {
+  const opts: IIssuesProcessorOptions = {
     ...DefaultProcessorOptions,
     daysBeforeClose: 0,
     startDate: january2021.toString()
@@ -281,7 +282,7 @@ test('processing an issue with no label and a start date as ISO 8601 being after
       '2020-01-01T17:00:00Z'
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -299,7 +300,7 @@ test('processing an issue with no label and a start date as ISO 8601 being after
 test('processing an issue with no label and a start date as RFC 2822 being before the issue creation date will make it stale and close it when it is old enough and days-before-close is set to 0', async () => {
   expect.assertions(2);
   const january2000 = 'January 1, 2000 00:00:00';
-  const opts: IssueProcessorOptions = {
+  const opts: IIssuesProcessorOptions = {
     ...DefaultProcessorOptions,
     daysBeforeClose: 0,
     startDate: january2000.toString()
@@ -313,7 +314,7 @@ test('processing an issue with no label and a start date as RFC 2822 being befor
       '2020-01-01T17:00:00Z'
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -331,7 +332,7 @@ test('processing an issue with no label and a start date as RFC 2822 being befor
 test('processing an issue with no label and a start date as RFC 2822 being after the issue creation date will not make it stale nor close it when it is old enough and days-before-close is set to 0', async () => {
   expect.assertions(2);
   const january2021 = 'January 1, 2021 00:00:00';
-  const opts: IssueProcessorOptions = {
+  const opts: IIssuesProcessorOptions = {
     ...DefaultProcessorOptions,
     daysBeforeClose: 0,
     startDate: january2021.toString()
@@ -345,7 +346,7 @@ test('processing an issue with no label and a start date as RFC 2822 being after
       '2020-01-01T17:00:00Z'
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -361,7 +362,7 @@ test('processing an issue with no label and a start date as RFC 2822 being after
 });
 
 test('processing an issue with no label will make it stale and close it, if it is old enough only if days-before-close is set to > 0 and days-before-issue-close is set to 0', async () => {
-  const opts: IssueProcessorOptions = {
+  const opts: IIssuesProcessorOptions = {
     ...DefaultProcessorOptions,
     daysBeforeClose: 1,
     daysBeforeIssueClose: 0
@@ -369,7 +370,7 @@ test('processing an issue with no label will make it stale and close it, if it i
   const TestIssueList: Issue[] = [
     generateIssue(opts, 1, 'An issue with no label', '2020-01-01T17:00:00Z')
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -386,7 +387,7 @@ test('processing an issue with no label will make it stale and close it, if it i
 });
 
 test('processing an issue with no label will make it stale and not close it, if it is old enough only if days-before-close is set to > 0 and days-before-issue-close is set to > 0', async () => {
-  const opts: IssueProcessorOptions = {
+  const opts: IIssuesProcessorOptions = {
     ...DefaultProcessorOptions,
     daysBeforeClose: 1,
     daysBeforeIssueClose: 1
@@ -394,7 +395,7 @@ test('processing an issue with no label will make it stale and not close it, if
   const TestIssueList: Issue[] = [
     generateIssue(opts, 1, 'An issue with no label', '2020-01-01T17:00:00Z')
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -410,14 +411,14 @@ test('processing an issue with no label will make it stale and not close it, if
 });
 
 test('processing an issue with no label will make it stale and not close it if days-before-close is set to > 0', async () => {
-  const opts: IssueProcessorOptions = {
+  const opts: IIssuesProcessorOptions = {
     ...DefaultProcessorOptions,
     daysBeforeClose: 15
   };
   const TestIssueList: Issue[] = [
     generateIssue(opts, 1, 'An issue with no label', '2020-01-01T17:00:00Z')
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -433,7 +434,7 @@ test('processing an issue with no label will make it stale and not close it if d
 });
 
 test('processing an issue with no label will make it stale and not close it if days-before-close is set to -1 and days-before-issue-close is set to > 0', async () => {
-  const opts: IssueProcessorOptions = {
+  const opts: IIssuesProcessorOptions = {
     ...DefaultProcessorOptions,
     daysBeforeClose: -1,
     daysBeforeIssueClose: 15
@@ -441,7 +442,7 @@ test('processing an issue with no label will make it stale and not close it if d
   const TestIssueList: Issue[] = [
     generateIssue(opts, 1, 'An issue with no label', '2020-01-01T17:00:00Z')
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -457,7 +458,7 @@ test('processing an issue with no label will make it stale and not close it if d
 });
 
 test('processing an issue with no label will not make it stale if days-before-stale is set to -1', async () => {
-  const opts: IssueProcessorOptions = {
+  const opts: IIssuesProcessorOptions = {
     ...DefaultProcessorOptions,
     staleIssueMessage: '',
     daysBeforeStale: -1
@@ -465,7 +466,7 @@ test('processing an issue with no label will not make it stale if days-before-st
   const TestIssueList: Issue[] = [
     generateIssue(opts, 1, 'An issue with no label', '2020-01-01T17:00:00Z')
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -481,7 +482,7 @@ test('processing an issue with no label will not make it stale if days-before-st
 });
 
 test('processing an issue with no label will not make it stale if days-before-stale and days-before-issue-stale are set to -1', async () => {
-  const opts: IssueProcessorOptions = {
+  const opts: IIssuesProcessorOptions = {
     ...DefaultProcessorOptions,
     staleIssueMessage: '',
     daysBeforeStale: -1,
@@ -490,7 +491,7 @@ test('processing an issue with no label will not make it stale if days-before-st
   const TestIssueList: Issue[] = [
     generateIssue(opts, 1, 'An issue with no label', '2020-01-01T17:00:00Z')
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -508,7 +509,7 @@ test('processing an issue with no label will not make it stale if days-before-st
 test('processing an issue with no label will make it stale but not close it', async () => {
   // issue should be from 2 days ago so it will be
   // stale but not close-able, based on default settings
-  let issueDate = new Date();
+  const issueDate = new Date();
   issueDate.setDate(issueDate.getDate() - 2);
   const TestIssueList: Issue[] = [
     generateIssue(
@@ -518,7 +519,7 @@ test('processing an issue with no label will make it stale but not close it', as
       issueDate.toDateString()
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     DefaultProcessorOptions,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -534,7 +535,7 @@ test('processing an issue with no label will make it stale but not close it', as
 });
 
 test('processing a stale issue will close it', async () => {
-  const opts: IssueProcessorOptions = {
+  const opts: IIssuesProcessorOptions = {
     ...DefaultProcessorOptions,
     daysBeforeClose: 30
   };
@@ -549,7 +550,7 @@ test('processing a stale issue will close it', async () => {
       ['Stale']
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -565,7 +566,7 @@ test('processing a stale issue will close it', async () => {
 });
 
 test('processing a stale issue containing a space in the label will close it', async () => {
-  const opts: IssueProcessorOptions = {
+  const opts: IIssuesProcessorOptions = {
     ...DefaultProcessorOptions,
     staleIssueLabel: 'state: stale'
   };
@@ -580,7 +581,7 @@ test('processing a stale issue containing a space in the label will close it', a
       ['state: stale']
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -596,7 +597,7 @@ test('processing a stale issue containing a space in the label will close it', a
 });
 
 test('processing a stale issue containing a slash in the label will close it', async () => {
-  const opts: IssueProcessorOptions = {
+  const opts: IIssuesProcessorOptions = {
     ...DefaultProcessorOptions,
     staleIssueLabel: 'lifecycle/stale'
   };
@@ -611,7 +612,7 @@ test('processing a stale issue containing a slash in the label will close it', a
       ['lifecycle/stale']
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -627,7 +628,7 @@ test('processing a stale issue containing a slash in the label will close it', a
 });
 
 test('processing a stale issue will close it when days-before-issue-stale override days-before-stale', async () => {
-  const opts: IssueProcessorOptions = {
+  const opts: IIssuesProcessorOptions = {
     ...DefaultProcessorOptions,
     daysBeforeClose: 30,
     daysBeforeIssueStale: 30
@@ -643,7 +644,7 @@ test('processing a stale issue will close it when days-before-issue-stale overri
       ['Stale']
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -659,7 +660,7 @@ test('processing a stale issue will close it when days-before-issue-stale overri
 });
 
 test('processing a stale PR will close it', async () => {
-  const opts: IssueProcessorOptions = {
+  const opts: IIssuesProcessorOptions = {
     ...DefaultProcessorOptions,
     daysBeforeClose: 30
   };
@@ -674,7 +675,7 @@ test('processing a stale PR will close it', async () => {
       ['Stale']
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -690,7 +691,7 @@ test('processing a stale PR will close it', async () => {
 });
 
 test('processing a stale PR will close it when days-before-pr-stale override days-before-stale', async () => {
-  const opts: IssueProcessorOptions = {
+  const opts: IIssuesProcessorOptions = {
     ...DefaultProcessorOptions,
     daysBeforeClose: 30,
     daysBeforePrClose: 30
@@ -706,7 +707,7 @@ test('processing a stale PR will close it when days-before-pr-stale override day
       ['Stale']
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -738,7 +739,7 @@ test('processing a stale issue will close it even if configured not to mark as s
       ['Stale']
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -771,7 +772,7 @@ test('processing a stale issue will close it even if configured not to mark as s
       ['Stale']
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -803,7 +804,7 @@ test('processing a stale PR will close it even if configured not to mark as stal
       ['Stale']
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -836,7 +837,7 @@ test('processing a stale PR will close it even if configured not to mark as stal
       ['Stale']
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -864,7 +865,7 @@ test('closed issues will not be marked stale', async () => {
       true
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     DefaultProcessorOptions,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -891,7 +892,7 @@ test('stale closed issues will not be closed', async () => {
       true
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     DefaultProcessorOptions,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -919,7 +920,7 @@ test('closed prs will not be marked stale', async () => {
       true
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     DefaultProcessorOptions,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -947,7 +948,7 @@ test('stale closed prs will not be closed', async () => {
       true
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     DefaultProcessorOptions,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -976,7 +977,7 @@ test('locked issues will not be marked stale', async () => {
       true
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     DefaultProcessorOptions,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : [])
@@ -1003,7 +1004,7 @@ test('stale locked issues will not be closed', async () => {
       true
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     DefaultProcessorOptions,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -1032,7 +1033,7 @@ test('locked prs will not be marked stale', async () => {
       true
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     DefaultProcessorOptions,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : [])
@@ -1059,7 +1060,7 @@ test('stale locked prs will not be closed', async () => {
       true
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     DefaultProcessorOptions,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -1089,7 +1090,7 @@ test('exempt issue labels will not be marked stale', async () => {
       ['Exempt']
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -1119,7 +1120,7 @@ test('exempt issue labels will not be marked stale (multi issue label with space
       ['Cool']
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -1148,7 +1149,7 @@ test('exempt issue labels will not be marked stale (multi issue label)', async (
       ['Cool']
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -1195,7 +1196,7 @@ test('exempt pr labels will not be marked stale', async () => {
       false
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -1224,7 +1225,7 @@ test('exempt issue labels will not be marked stale and will remove the existing
       ['Exempt', 'Stale']
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -1279,7 +1280,7 @@ test('stale issues should not be closed if days is set to -1', async () => {
       ['Stale']
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -1308,7 +1309,7 @@ test('stale label should be removed if a comment was added to a stale issue', as
       ['Stale']
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -1346,7 +1347,7 @@ test('stale label should not be removed if a comment was added by the bot (and t
       ['Stale']
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -1370,7 +1371,7 @@ test('stale label should not be removed if a comment was added by the bot (and t
 });
 
 test('stale label containing a space should be removed if a comment was added to a stale issue', async () => {
-  const opts: IssueProcessorOptions = {
+  const opts: IIssuesProcessorOptions = {
     ...DefaultProcessorOptions,
     removeStaleWhenUpdated: true,
     staleIssueLabel: 'stat: stale'
@@ -1386,7 +1387,7 @@ test('stale label containing a space should be removed if a comment was added to
       ['stat: stale']
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -1406,7 +1407,7 @@ test('stale issues should not be closed until after the closed number of days',
   const opts = {...DefaultProcessorOptions};
   opts.daysBeforeStale = 5; // stale after 5 days
   opts.daysBeforeClose = 1; // closes after 6 days
-  let lastUpdate = new Date();
+  const lastUpdate = new Date();
   lastUpdate.setDate(lastUpdate.getDate() - 5);
   const TestIssueList: Issue[] = [
     generateIssue(
@@ -1418,7 +1419,7 @@ test('stale issues should not be closed until after the closed number of days',
       false
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -1438,7 +1439,7 @@ test('stale issues should be closed if the closed nubmer of days (additive) is a
   const opts = {...DefaultProcessorOptions};
   opts.daysBeforeStale = 5; // stale after 5 days
   opts.daysBeforeClose = 1; // closes after 6 days
-  let lastUpdate = new Date();
+  const lastUpdate = new Date();
   lastUpdate.setDate(lastUpdate.getDate() - 7);
   const TestIssueList: Issue[] = [
     generateIssue(
@@ -1451,7 +1452,7 @@ test('stale issues should be closed if the closed nubmer of days (additive) is a
       ['Stale']
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -1471,7 +1472,7 @@ test('stale issues should not be closed until after the closed number of days (l
   const opts = {...DefaultProcessorOptions};
   opts.daysBeforeStale = 5; // stale after 5 days
   opts.daysBeforeClose = 20; // closes after 25 days
-  let lastUpdate = new Date();
+  const lastUpdate = new Date();
   lastUpdate.setDate(lastUpdate.getDate() - 10);
   const TestIssueList: Issue[] = [
     generateIssue(
@@ -1483,7 +1484,7 @@ test('stale issues should not be closed until after the closed number of days (l
       false
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -1504,7 +1505,7 @@ test('skips stale message on issues when skip-stale-issue-message is set', async
   opts.daysBeforeStale = 5; // stale after 5 days
   opts.daysBeforeClose = 20; // closes after 25 days
   opts.skipStaleIssueMessage = true;
-  let lastUpdate = new Date();
+  const lastUpdate = new Date();
   lastUpdate.setDate(lastUpdate.getDate() - 10);
   const TestIssueList: Issue[] = [
     generateIssue(
@@ -1516,7 +1517,7 @@ test('skips stale message on issues when skip-stale-issue-message is set', async
       false
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -1549,7 +1550,7 @@ test('skips stale message on prs when skip-stale-pr-message is set', async () =>
   opts.daysBeforeStale = 5; // stale after 5 days
   opts.daysBeforeClose = 20; // closes after 25 days
   opts.skipStalePrMessage = true;
-  let lastUpdate = new Date();
+  const lastUpdate = new Date();
   lastUpdate.setDate(lastUpdate.getDate() - 10);
   const TestIssueList: Issue[] = [
     generateIssue(
@@ -1561,7 +1562,7 @@ test('skips stale message on prs when skip-stale-pr-message is set', async () =>
       true
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -1595,7 +1596,7 @@ test('not providing state takes precedence over skipStaleIssueMessage', async ()
   opts.daysBeforeClose = 20; // closes after 25 days
   opts.skipStalePrMessage = true;
   opts.staleIssueMessage = '';
-  let lastUpdate = new Date();
+  const lastUpdate = new Date();
   lastUpdate.setDate(lastUpdate.getDate() - 10);
   const TestIssueList: Issue[] = [
     generateIssue(
@@ -1607,7 +1608,7 @@ test('not providing state takes precedence over skipStaleIssueMessage', async ()
       false
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -1629,7 +1630,7 @@ test('not providing stalePrMessage takes precedence over skipStalePrMessage', as
   opts.daysBeforeClose = 20; // closes after 25 days
   opts.skipStalePrMessage = true;
   opts.stalePrMessage = '';
-  let lastUpdate = new Date();
+  const lastUpdate = new Date();
   lastUpdate.setDate(lastUpdate.getDate() - 10);
   const TestIssueList: Issue[] = [
     generateIssue(
@@ -1641,7 +1642,7 @@ test('not providing stalePrMessage takes precedence over skipStalePrMessage', as
       true
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -1671,7 +1672,7 @@ test('git branch is deleted when option is enabled', async () => {
       ['Stale']
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -1701,7 +1702,7 @@ test('git branch is not deleted when issue is not pull request', async () => {
       ['Stale']
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -1733,7 +1734,7 @@ test('an issue without a milestone will be marked as stale', async () => {
       ''
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     DefaultProcessorOptions,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -1767,7 +1768,7 @@ test('an issue without an exempted milestone will be marked as stale', async ()
       'Milestone'
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -1801,7 +1802,7 @@ test('an issue with an exempted milestone will not be marked as stale', async ()
       'Milestone1'
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -1835,7 +1836,7 @@ test('an issue with an exempted milestone will not be marked as stale (multi mil
       'Milestone2'
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -1869,7 +1870,7 @@ test('an issue with an exempted milestone will not be marked as stale (multi mil
       'Milestone2'
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -1904,7 +1905,7 @@ test('an issue with an exempted milestone but without an exempted issue mileston
       'Milestone1'
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -1939,7 +1940,7 @@ test('an issue with an exempted milestone but with another exempted issue milest
       'Milestone1'
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -1974,7 +1975,7 @@ test('an issue with an exempted milestone and with an exempted issue milestone w
       'Milestone1'
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -2006,7 +2007,7 @@ test('a PR without a milestone will be marked as stale', async () => {
       ''
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     DefaultProcessorOptions,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -2040,7 +2041,7 @@ test('a PR without an exempted milestone will be marked as stale', async () => {
       'Milestone'
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -2074,7 +2075,7 @@ test('a PR with an exempted milestone will not be marked as stale', async () =>
       'Milestone1'
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -2108,7 +2109,7 @@ test('a PR with an exempted milestone will not be marked as stale (multi milesto
       'Milestone2'
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -2142,7 +2143,7 @@ test('a PR with an exempted milestone will not be marked as stale (multi milesto
       'Milestone2'
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -2177,7 +2178,7 @@ test('a PR with an exempted milestone but without an exempted issue milestone wi
       'Milestone1'
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -2212,7 +2213,7 @@ test('a PR with an exempted milestone but with another exempted issue milestone
       'Milestone1'
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -2247,7 +2248,7 @@ test('a PR with an exempted milestone and with an exempted issue milestone will
       'Milestone1'
     )
   ];
-  const processor = new IssueProcessor(
+  const processor = new IssuesProcessor(
     opts,
     async () => 'abot',
     async p => (p == 1 ? TestIssueList : []),
@@ -2262,3 +2263,186 @@ test('a PR with an exempted milestone and with an exempted issue milestone will
   expect(processor.closedIssues.length).toStrictEqual(0);
   expect(processor.removedLabelIssues.length).toStrictEqual(0);
 });
+
+test('processing an issue opened since 2 days and with the option "daysBeforeIssueStale" at 3 will not make it stale', async () => {
+  expect.assertions(2);
+  const opts: IIssuesProcessorOptions = {
+    ...DefaultProcessorOptions,
+    daysBeforeStale: 10,
+    daysBeforeIssueStale: 3
+  };
+  const issueDate = new Date();
+  issueDate.setDate(issueDate.getDate() - 2);
+  const TestIssueList: Issue[] = [
+    generateIssue(opts, 1, 'An issue with no label', issueDate.toDateString())
+  ];
+  const processor = new IssuesProcessor(
+    opts,
+    async () => 'abot',
+    async p => (p == 1 ? TestIssueList : []),
+    async (num, dt) => [],
+    async (issue, label) => new Date().toDateString()
+  );
+
+  // process our fake issue list
+  await processor.processIssues(1);
+
+  expect(processor.staleIssues.length).toEqual(0);
+  expect(processor.closedIssues.length).toEqual(0);
+});
+
+test('processing an issue opened since 2 days and with the option "daysBeforeIssueStale" at 2 will make it stale', async () => {
+  expect.assertions(2);
+  const opts: IIssuesProcessorOptions = {
+    ...DefaultProcessorOptions,
+    daysBeforeStale: 10,
+    daysBeforeIssueStale: 2
+  };
+  const issueDate = new Date();
+  issueDate.setDate(issueDate.getDate() - 2);
+  const TestIssueList: Issue[] = [
+    generateIssue(opts, 1, 'An issue with no label', issueDate.toDateString())
+  ];
+  const processor = new IssuesProcessor(
+    opts,
+    async () => 'abot',
+    async p => (p == 1 ? TestIssueList : []),
+    async (num, dt) => [],
+    async (issue, label) => new Date().toDateString()
+  );
+
+  // process our fake issue list
+  await processor.processIssues(1);
+
+  expect(processor.staleIssues.length).toEqual(1);
+  expect(processor.closedIssues.length).toEqual(0);
+});
+
+test('processing an issue opened since 2 days and with the option "daysBeforeIssueStale" at 1 will make it stale', async () => {
+  expect.assertions(2);
+  const opts: IIssuesProcessorOptions = {
+    ...DefaultProcessorOptions,
+    daysBeforeStale: 10,
+    daysBeforeIssueStale: 1
+  };
+  const issueDate = new Date();
+  issueDate.setDate(issueDate.getDate() - 2);
+  const TestIssueList: Issue[] = [
+    generateIssue(opts, 1, 'An issue with no label', issueDate.toDateString())
+  ];
+  const processor = new IssuesProcessor(
+    opts,
+    async () => 'abot',
+    async p => (p == 1 ? TestIssueList : []),
+    async (num, dt) => [],
+    async (issue, label) => new Date().toDateString()
+  );
+
+  // process our fake issue list
+  await processor.processIssues(1);
+
+  expect(processor.staleIssues.length).toEqual(1);
+  expect(processor.closedIssues.length).toEqual(0);
+});
+
+test('processing a pull request opened since 2 days and with the option "daysBeforePrStale" at 3 will not make it stale', async () => {
+  expect.assertions(2);
+  const opts: IIssuesProcessorOptions = {
+    ...DefaultProcessorOptions,
+    daysBeforeStale: 10,
+    daysBeforePrStale: 3
+  };
+  const issueDate = new Date();
+  issueDate.setDate(issueDate.getDate() - 2);
+  const TestIssueList: Issue[] = [
+    generateIssue(
+      opts,
+      1,
+      'A pull request with no label',
+      issueDate.toDateString(),
+      issueDate.toDateString(),
+      true
+    )
+  ];
+  const processor = new IssuesProcessor(
+    opts,
+    async () => 'abot',
+    async p => (p == 1 ? TestIssueList : []),
+    async (num, dt) => [],
+    async (issue, label) => new Date().toDateString()
+  );
+
+  // process our fake issue list
+  await processor.processIssues(1);
+
+  expect(processor.staleIssues.length).toEqual(0);
+  expect(processor.closedIssues.length).toEqual(0);
+});
+
+test('processing a pull request opened since 2 days and with the option "daysBeforePrStale" at 2 will make it stale', async () => {
+  expect.assertions(2);
+  const opts: IIssuesProcessorOptions = {
+    ...DefaultProcessorOptions,
+    daysBeforeStale: 10,
+    daysBeforePrStale: 2
+  };
+  const issueDate = new Date();
+  issueDate.setDate(issueDate.getDate() - 2);
+  const TestIssueList: Issue[] = [
+    generateIssue(
+      opts,
+      1,
+      'A pull request with no label',
+      issueDate.toDateString(),
+      issueDate.toDateString(),
+      true
+    )
+  ];
+  const processor = new IssuesProcessor(
+    opts,
+    async () => 'abot',
+    async p => (p == 1 ? TestIssueList : []),
+    async (num, dt) => [],
+    async (issue, label) => new Date().toDateString()
+  );
+
+  // process our fake issue list
+  await processor.processIssues(1);
+
+  expect(processor.staleIssues.length).toEqual(1);
+  expect(processor.closedIssues.length).toEqual(0);
+});
+
+test('processing a pull request opened since 2 days and with the option "daysBeforePrStale" at 1 will make it stale', async () => {
+  expect.assertions(2);
+  const opts: IIssuesProcessorOptions = {
+    ...DefaultProcessorOptions,
+    daysBeforeStale: 10,
+    daysBeforePrStale: 1
+  };
+  const issueDate = new Date();
+  issueDate.setDate(issueDate.getDate() - 2);
+  const TestIssueList: Issue[] = [
+    generateIssue(
+      opts,
+      1,
+      'A pull request with no label',
+      issueDate.toDateString(),
+      issueDate.toDateString(),
+      true
+    )
+  ];
+  const processor = new IssuesProcessor(
+    opts,
+    async () => 'abot',
+    async p => (p == 1 ? TestIssueList : []),
+    async (num, dt) => [],
+    async (issue, label) => new Date().toDateString()
+  );
+
+  // process our fake issue list
+  await processor.processIssues(1);
+
+  expect(processor.staleIssues.length).toEqual(1);
+  expect(processor.closedIssues.length).toEqual(0);
+});