Remove stale when updated without comment (#717)

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
This commit is contained in:
0x5c 2022-06-20 15:38:43 -04:00 committed by GitHub
parent 6b7f9717b7
commit 29e800e1c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2127 additions and 2127 deletions

4
dist/index.js vendored
View File

@ -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);

View File

@ -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);