Skip to content

Commit

Permalink
Remove stale when updated without comment
Browse files Browse the repository at this point in the history
The existing logic for `remove-stale-when-updated` only considers presence of
comments, ignoring the value of `issueHasUpdate`.

This commits fixes it so it follows the documented behaviour for that setting.

Fixes #715
  • Loading branch information
0x5c committed Jun 8, 2022
1 parent 65d24b7 commit 630b3fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dist/index.js
Expand Up @@ -741,9 +741,9 @@ class IssuesProcessor {
}
// Should we un-stale this issue?
if (shouldRemoveStaleWhenUpdated &&
issueHasComments &&
(issueHasUpdate || issueHasComments) &&
!issue.markedStaleThisRun) {
issueLogger.info(`Remove the stale label since the $$type has a comment and the workflow should remove the stale label when updated`);
issueLogger.info(`Remove the stale label since the $$type has been updated and the workflow should remove the stale label when updated`);
yield this._removeStaleLabel(issue, staleLabel);
// Are there labels to remove or add when an issue is no longer stale?
yield this._removeLabelsWhenUnstale(issue, labelsToRemoveWhenUnstale);
Expand Down
4 changes: 2 additions & 2 deletions src/classes/issues-processor.ts
Expand Up @@ -674,11 +674,11 @@ export class IssuesProcessor {
// Should we un-stale this issue?
if (
shouldRemoveStaleWhenUpdated &&
issueHasComments &&
(issueHasUpdate || issueHasComments) &&
!issue.markedStaleThisRun
) {
issueLogger.info(
`Remove the stale label since the $$type has a comment and the workflow should remove the stale label when updated`
`Remove the stale label since the $$type has been updated and the workflow should remove the stale label when updated`
);
await this._removeStaleLabel(issue, staleLabel);

Expand Down

0 comments on commit 630b3fc

Please sign in to comment.