update logging message for exempt labels
This commit is contained in:
parent
e27c9afd63
commit
fde7d4444e
|
@ -246,8 +246,7 @@ Required Permission: `pull-requests: write`
|
||||||
|
|
||||||
#### exempt-issue-labels
|
#### exempt-issue-labels
|
||||||
|
|
||||||
The label(s) that can exempt to automatically mark as stale the issues.
|
A comma separated list of labels, that prevent the issue from being marked as stale. (e.g: `question,bug,wip`)
|
||||||
It can be a comma separated list of labels (e.g: `question,bug`).
|
|
||||||
|
|
||||||
If unset (or an empty string), this option will not alter the stale workflow.
|
If unset (or an empty string), this option will not alter the stale workflow.
|
||||||
|
|
||||||
|
|
|
@ -526,14 +526,15 @@ class IssuesProcessor {
|
||||||
issueLogger.info(`This $$type has a stale label`);
|
issueLogger.info(`This $$type has a stale label`);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
issueLogger.info(`This $$type hasn't a stale label`);
|
issueLogger.info(`This $$type doesn't have a stale label`);
|
||||||
}
|
}
|
||||||
const exemptLabels = words_to_list_1.wordsToList(issue.isPullRequest
|
const exemptLabels = words_to_list_1.wordsToList(issue.isPullRequest
|
||||||
? this.options.exemptPrLabels
|
? this.options.exemptPrLabels
|
||||||
: this.options.exemptIssueLabels);
|
: this.options.exemptIssueLabels);
|
||||||
if (exemptLabels.some((exemptLabel) => is_labeled_1.isLabeled(issue, exemptLabel))) {
|
if (exemptLabels.some((exemptLabel) => is_labeled_1.isLabeled(issue, exemptLabel))) {
|
||||||
if (issue.isStale) {
|
if (issue.isStale) {
|
||||||
issueLogger.info(`An exempt label was added after the stale label.`);
|
// issueLogger.info(`An exempt label was added after the stale label.`);
|
||||||
|
issueLogger.info(`This $$type has an exempt label, removing the stale label.`);
|
||||||
yield this._removeStaleLabel(issue, staleLabel);
|
yield this._removeStaleLabel(issue, staleLabel);
|
||||||
}
|
}
|
||||||
issueLogger.info(`Skipping this $$type because it has an exempt label`);
|
issueLogger.info(`Skipping this $$type because it has an exempt label`);
|
||||||
|
|
|
@ -323,7 +323,7 @@ export class IssuesProcessor {
|
||||||
if (issue.isStale) {
|
if (issue.isStale) {
|
||||||
issueLogger.info(`This $$type has a stale label`);
|
issueLogger.info(`This $$type has a stale label`);
|
||||||
} else {
|
} else {
|
||||||
issueLogger.info(`This $$type hasn't a stale label`);
|
issueLogger.info(`This $$type doesn't have a stale label`);
|
||||||
}
|
}
|
||||||
|
|
||||||
const exemptLabels: string[] = wordsToList(
|
const exemptLabels: string[] = wordsToList(
|
||||||
|
@ -338,7 +338,10 @@ export class IssuesProcessor {
|
||||||
)
|
)
|
||||||
) {
|
) {
|
||||||
if (issue.isStale) {
|
if (issue.isStale) {
|
||||||
issueLogger.info(`An exempt label was added after the stale label.`);
|
// issueLogger.info(`An exempt label was added after the stale label.`);
|
||||||
|
issueLogger.info(
|
||||||
|
`This $$type has an exempt label, removing the stale label.`
|
||||||
|
);
|
||||||
await this._removeStaleLabel(issue, staleLabel);
|
await this._removeStaleLabel(issue, staleLabel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue