mirror of
https://github.com/actions/stale.git
synced 2026-01-02 13:28:17 +00:00
Compare commits
1 Commits
johnsudol/
...
johnsudol/
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
663c9aae2b |
@@ -246,7 +246,8 @@ Required Permission: `pull-requests: write`
|
|||||||
|
|
||||||
#### exempt-issue-labels
|
#### exempt-issue-labels
|
||||||
|
|
||||||
A comma separated list of labels, that prevent the issue from being marked as stale. (e.g: `question,bug,wip`)
|
The label(s) that can exempt to automatically mark as stale the issues.
|
||||||
|
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.
|
||||||
|
|
||||||
|
|||||||
7
dist/index.js
vendored
7
dist/index.js
vendored
@@ -381,7 +381,7 @@ class IssuesProcessor {
|
|||||||
this.options = options;
|
this.options = options;
|
||||||
this.client = github_1.getOctokit(this.options.repoToken);
|
this.client = github_1.getOctokit(this.options.repoToken);
|
||||||
this.operations = new stale_operations_1.StaleOperations(this.options);
|
this.operations = new stale_operations_1.StaleOperations(this.options);
|
||||||
this._logger.info(logger_service_1.LoggerService.yellow(`Starting the stale action process... logging`));
|
this._logger.info(logger_service_1.LoggerService.yellow(`Starting the stale action process...`));
|
||||||
if (this.options.debugOnly) {
|
if (this.options.debugOnly) {
|
||||||
this._logger.warning(logger_service_1.LoggerService.yellowBright(`Executing in debug mode!`));
|
this._logger.warning(logger_service_1.LoggerService.yellowBright(`Executing in debug mode!`));
|
||||||
this._logger.warning(logger_service_1.LoggerService.yellowBright(`The debug output will be written but no issues/PRs will be processed.`));
|
this._logger.warning(logger_service_1.LoggerService.yellowBright(`The debug output will be written but no issues/PRs will be processed.`));
|
||||||
@@ -526,15 +526,14 @@ class IssuesProcessor {
|
|||||||
issueLogger.info(`This $$type has a stale label`);
|
issueLogger.info(`This $$type has a stale label`);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
issueLogger.info(`This $$type doesn't have a stale label`);
|
issueLogger.info(`This $$type hasn't 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`);
|
||||||
|
|||||||
@@ -32,8 +32,8 @@
|
|||||||
"stale"
|
"stale"
|
||||||
],
|
],
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "12",
|
"node": "16",
|
||||||
"npm": "6"
|
"npm": "8"
|
||||||
},
|
},
|
||||||
"author": "GitHub",
|
"author": "GitHub",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ export class IssuesProcessor {
|
|||||||
this.operations = new StaleOperations(this.options);
|
this.operations = new StaleOperations(this.options);
|
||||||
|
|
||||||
this._logger.info(
|
this._logger.info(
|
||||||
LoggerService.yellow(`Starting the stale action process... logging`)
|
LoggerService.yellow(`Starting the stale action process...`)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (this.options.debugOnly) {
|
if (this.options.debugOnly) {
|
||||||
@@ -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 doesn't have a stale label`);
|
issueLogger.info(`This $$type hasn't a stale label`);
|
||||||
}
|
}
|
||||||
|
|
||||||
const exemptLabels: string[] = wordsToList(
|
const exemptLabels: string[] = wordsToList(
|
||||||
@@ -338,10 +338,7 @@ 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user