feat(options): simplify config by removing skip stale message options (#457)

* feat(options): simplify config by removing skip stale message options

Closes #405
Closes #455

BREAKING CHANGES: remove skip-stale-issue-message and skip-stale-pr-message options. If you used this option, replace it by an empty message for the options stale-issue-message and stale-pr-message

* build(dist): update dist

also lint some files

* docs(readme): update the docs by removing the skip options
This commit is contained in:
Geoffrey Testelin
2021-05-25 20:14:22 +02:00
committed by GitHub
parent 16dfaa2c02
commit 6ec637d238
12 changed files with 1868 additions and 1904 deletions

View File

@@ -138,8 +138,8 @@ export class IssuesProcessor {
? this.options.closePrLabel
: this.options.closeIssueLabel;
const skipMessage = issue.isPullRequest
? this.options.skipStalePrMessage
: this.options.skipStaleIssueMessage;
? this.options.stalePrMessage.length === 0
: this.options.staleIssueMessage.length === 0;
const daysBeforeStale: number = issue.isPullRequest
? this._getDaysBeforePrStale()
: this._getDaysBeforeIssueStale();
@@ -196,20 +196,6 @@ export class IssuesProcessor {
const shouldMarkAsStale: boolean = shouldMarkWhenStale(daysBeforeStale);
if (!staleMessage && shouldMarkAsStale) {
issueLogger.info(
`Skipping this $$type because it should be marked as stale based on the option ${issueLogger.createOptionLink(
this._getDaysBeforeStaleUsedOptionName(issue)
)} (${chalk.cyan(
daysBeforeStale
)}) but the option ${issueLogger.createOptionLink(
IssuesProcessor._getStaleMessageUsedOptionName(issue)
)} is not set`
);
IssuesProcessor._endIssueProcessing(issue);
continue;
}
if (issue.state === 'closed') {
issueLogger.info(`Skipping this $$type because it is closed`);
IssuesProcessor._endIssueProcessing(issue);