Skip to content

Commit 213e5e0

Browse files
[Infra] Fix missing issue comments when releasing (#3385)
1 parent 833e9c8 commit 213e5e0

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

build/scripts/post-release.psm1

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,19 @@ function TryPostPackagesReadyNoticeOnPrepareReleasePullRequest {
113113
}
114114

115115
$foundComment = $false
116+
117+
$expectedCommentAuthorLogin = $expectedPrAuthorUserName
118+
119+
# The GitHub API requires bot users to be prefixed with "app/" when querying issues/PRs, but the login in the
120+
# response for comments does not include the "app/" prefix, so we need to trim it off here to find the comment.
121+
if ($expectedCommentAuthorLogin.StartsWith("app/"))
122+
{
123+
$expectedCommentAuthorLogin = $expectedCommentAuthorLogin.Substring(4)
124+
}
125+
116126
foreach ($comment in $pr.comments)
117127
{
118-
if ($comment.author.login -eq $expectedPrAuthorUserName -and $comment.body.StartsWith("I just pushed the [$tag]"))
128+
if ($comment.author.login -eq $expectedCommentAuthorLogin -and $comment.body.StartsWith("I just pushed the [$tag]"))
119129
{
120130
$foundComment = $true
121131
break

0 commit comments

Comments
 (0)