Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Azure Developer CLI

Test changes
Latest (daily) builds:

| Package | Version | Download |
Expand Down
1 change: 1 addition & 0 deletions cli/test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test
2 changes: 2 additions & 0 deletions eng/pipelines/build-notice.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# test change

pr:
branches:
include: [main]
Expand Down
29 changes: 20 additions & 9 deletions eng/scripts/Update-PRComment.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,33 @@ if ($Tag) {
# paginated result set returning on a single line with no clear separating
# sequence (i.e. "[{...}, {...}][{...},{...}]"). The result without --jq is
# not parsable JSON because of the "][" sequence without a wrapping array.
Write-Host @"
gh api `
repos/$Repo/issues/$PrNumber/comments `
--paginate `
--jq '.[]'
"@

$commentsJsonRows = gh api `
repos/$Repo/issues/$PrNumber/comments `
--paginate `
--jq '.[]'
$comments = @()
foreach ($row in $commentsJsonRows) {
$comments +=@( ConvertFrom-Json $row )
}

Write-Host "Comments found: $($comments.Length)"
if ($commentsJsonRows) {
$comments = @()
foreach ($row in $commentsJsonRows) {
$comments +=@( ConvertFrom-Json $row )
}

$commentsToErase = $comments.Where({ $_.body.Contains($Tag) })
foreach ($comment in $commentsToErase) {
Write-Host "Deleting previous tagged comment $($comment.id)"
gh api --method DELETE "repos/$Repo/issues/comments/$($comment.id)"
Write-Host "Comments found: $($comments.Length)"

$commentsToErase = $comments.Where({ $_.body.Contains($Tag) })
foreach ($comment in $commentsToErase) {
Write-Host "Deleting previous tagged comment $($comment.id)"
gh api --method DELETE "repos/$Repo/issues/comments/$($comment.id)"
}
}

}

Write-Host "Posting comment"
Expand Down
1 change: 1 addition & 0 deletions ext/vscode/test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test
1 change: 1 addition & 0 deletions generators/repo/test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
test