From 9312ea266269c76c00d3dfcab919e5082e1996ef Mon Sep 17 00:00:00 2001 From: Daniel Jurek Date: Thu, 7 Jul 2022 09:24:05 -0700 Subject: [PATCH 1/4] Test cli pipeline triggers --- cli/test.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 cli/test.txt diff --git a/cli/test.txt b/cli/test.txt new file mode 100644 index 00000000000..30d74d25844 --- /dev/null +++ b/cli/test.txt @@ -0,0 +1 @@ +test \ No newline at end of file From 3eeff951ce5933ef64799180f65c9a54bca6e5e6 Mon Sep 17 00:00:00 2001 From: Daniel Jurek Date: Thu, 7 Jul 2022 09:27:29 -0700 Subject: [PATCH 2/4] Test other pipelines --- eng/pipelines/build-notice.yml | 2 ++ ext/vscode/test.txt | 1 + generators/repo/test.txt | 1 + 3 files changed, 4 insertions(+) create mode 100644 ext/vscode/test.txt create mode 100644 generators/repo/test.txt diff --git a/eng/pipelines/build-notice.yml b/eng/pipelines/build-notice.yml index 36a410389c9..be52824627f 100644 --- a/eng/pipelines/build-notice.yml +++ b/eng/pipelines/build-notice.yml @@ -1,3 +1,5 @@ +# test change + pr: branches: include: [main] diff --git a/ext/vscode/test.txt b/ext/vscode/test.txt new file mode 100644 index 00000000000..30d74d25844 --- /dev/null +++ b/ext/vscode/test.txt @@ -0,0 +1 @@ +test \ No newline at end of file diff --git a/generators/repo/test.txt b/generators/repo/test.txt new file mode 100644 index 00000000000..30d74d25844 --- /dev/null +++ b/generators/repo/test.txt @@ -0,0 +1 @@ +test \ No newline at end of file From 9fdd513ad811f26c32a2e7ca7d93ec9bd6208184 Mon Sep 17 00:00:00 2001 From: Daniel Jurek Date: Thu, 7 Jul 2022 09:33:24 -0700 Subject: [PATCH 3/4] Small change to re-trigger pipelines --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 85c583feb40..d013b49c7f9 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Azure Developer CLI - +Test changes Latest (daily) builds: | Package | Version | Download | From 0a0b85d2c13f2d7aa067c906bfec933fc4999012 Mon Sep 17 00:00:00 2001 From: Daniel Jurek Date: Thu, 7 Jul 2022 09:54:54 -0700 Subject: [PATCH 4/4] More logging for Update-PRComment.ps1 and condition around absence of comments --- eng/scripts/Update-PRComment.ps1 | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/eng/scripts/Update-PRComment.ps1 b/eng/scripts/Update-PRComment.ps1 index c1e16b7658f..77932595196 100644 --- a/eng/scripts/Update-PRComment.ps1 +++ b/eng/scripts/Update-PRComment.ps1 @@ -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"