Skip to content

Commit 40984f4

Browse files
authored
Merge pull request #3537 from baywet/bugfix/null-date
- fixes the type constraints for null dates in labelling automation
2 parents e4ddb5e + 7b91875 commit 40984f4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

scripts/close-no-recent.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ $oldIssues = gh issue list --label "$Env:NO_RECENT_ACTIVITY_LABEL" --state open
33
foreach($oldIssue in $oldIssues) {
44
$lastComment = gh issue view $oldIssue.number --json comments | ConvertFrom-Json | Select-Object -ExpandProperty comments | Where-Object {$_.author.login -eq $oldIssue.author.login} | Select-Object -Last 1
55
if($null -eq $lastComment) {
6-
$lastCommentDate = [datetime]$null
6+
$lastCommentDate = [Nullable[datetime]]$null
77
} else {
88
$lastCommentDate = $lastComment.createdAt #powershell already parses the date for us with the json conversion
99
}

scripts/label-no-recent.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ $oldIssues = gh issue list --label "$Env:NEEDS_AUTHOR_FEEDBACK_LABEL" --state op
33
foreach($oldIssue in $oldIssues) {
44
$lastComment = gh issue view $oldIssue.number --json comments | ConvertFrom-Json | Select-Object -ExpandProperty comments | Where-Object {$_.author.login -eq $oldIssue.author.login} | Select-Object -Last 1
55
if($null -eq $lastComment) {
6-
$lastCommentDate = [datetime]$null
6+
$lastCommentDate = [Nullable[datetime]]$null
77
} else {
88
$lastCommentDate = $lastComment.createdAt #powershell already parses the date for us with the json conversion
99
}

0 commit comments

Comments
 (0)