diff --git a/scripts/close-no-recent.ps1 b/scripts/close-no-recent.ps1 index 4923e5a7d5..cf820a62af 100644 --- a/scripts/close-no-recent.ps1 +++ b/scripts/close-no-recent.ps1 @@ -12,7 +12,7 @@ foreach($oldIssue in $oldIssues) { $lastLabelEventDate = [datetime]::Parse($lastLabelEvent.created_at) if ($lastCommentDate -gt $lastLabelEventDate) { gh issue edit $oldIssue.number --remove-label "$Env:NO_RECENT_ACTIVITY_LABEL" --remove-label "$Env:NEEDS_AUTHOR_FEEDBACK_LABEL" --add-label "$Env:NEEDS_ATTENTION_LABEL" - } elseif (($lastCommentDate - $lastLabelEventDate) -le $inactivityDelay) { + } elseif (($lastLabelEventDate - $lastCommentDate) -ge $inactivityDelay) { gh issue close $oldIssue.number -r "not planned" } } \ No newline at end of file diff --git a/scripts/label-no-recent.ps1 b/scripts/label-no-recent.ps1 index 3cb696060c..ed1e997663 100644 --- a/scripts/label-no-recent.ps1 +++ b/scripts/label-no-recent.ps1 @@ -12,7 +12,7 @@ foreach($oldIssue in $oldIssues) { $lastLabelEventDate = [datetime]::Parse($lastLabelEvent.created_at) if ($lastCommentDate -gt $lastLabelEventDate) { gh issue edit $oldIssue.number --remove-label "$Env:NO_RECENT_ACTIVITY_LABEL" --remove-label "$Env:NEEDS_AUTHOR_FEEDBACK_LABEL" --add-label "$Env:NEEDS_ATTENTION_LABEL" - } elseif (($lastCommentDate - $lastLabelEventDate) -le $inactivityDelay) { + } elseif (($lastLabelEventDate -$lastCommentDate) -ge $inactivityDelay) { gh issue edit $oldIssue.number --add-label "$Env:NO_RECENT_ACTIVITY_LABEL" --remove-label "$Env:NEEDS_ATTENTION_LABEL" gh issue comment $oldIssue.number -b "$Env:NO_RECENT_ACTIVITY_COMMENT" }