mirror of
https://github.com/actions/stale.git
synced 2025-12-12 13:07:28 +00:00
Allow for issues/PRs to be closed after manually being marked as stale (#103)
Previously this action would stop and skip all issues or pull requests it found if no `stale-issue-message | stale-pr-message` option had been configured. Configuring `days-before-stale: -1` will activate that behaviour.
This commit is contained in:
@@ -130,8 +130,9 @@ export class IssueProcessor {
|
||||
isPr ? this.options.exemptPrLabels : this.options.exemptIssueLabels
|
||||
);
|
||||
const issueType: string = isPr ? 'pr' : 'issue';
|
||||
const shouldMarkWhenStale = this.options.daysBeforeStale > -1;
|
||||
|
||||
if (!staleMessage) {
|
||||
if (!staleMessage && shouldMarkWhenStale) {
|
||||
core.info(`Skipping ${issueType} due to empty stale message`);
|
||||
continue;
|
||||
}
|
||||
@@ -165,7 +166,7 @@ export class IssueProcessor {
|
||||
);
|
||||
|
||||
// determine if this issue needs to be marked stale first
|
||||
if (!isStale && shouldBeStale) {
|
||||
if (!isStale && shouldBeStale && shouldMarkWhenStale) {
|
||||
core.info(
|
||||
`Marking ${issueType} stale because it was last updated on ${issue.updated_at} and it does not have a stale label`
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user