From d7c80d06aaee398059b83497c7bfced59d537045 Mon Sep 17 00:00:00 2001 From: MaxymVlasov Date: Thu, 13 Feb 2025 01:38:20 +0200 Subject: [PATCH] f --- .github/workflows/test.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index e308e1a..b9ee0ee 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -209,11 +209,19 @@ jobs: 'sort_by(.created_at) | reverse | .[0] | select(.body | contains("Dive Summary")) | .id') echo "Comment ID: $comment_id" - if [ -z "$comment_id" ]; then - echo "Expected comment not found in PR" + # Create a review comment and mark it as resolved + review_comment_id=$(gh api "repos/${{ github.repository }}/pulls/${pr_number}/comments" \ + -f body="Marking as resolved" \ + -f commit_id=$(git rev-parse HEAD) \ + -f path="path/to/file" \ + -f position=1 \ + --jq '.id') + + if [ -z "$review_comment_id" ]; then + echo "Failed to create review comment" exit 1 fi - # Mark the comment as resolved - gh api -X PATCH "repos/${{ github.repository }}/pulls/comments/${comment_id}" \ + # Mark the review comment as resolved + gh api -X PATCH "repos/${{ github.repository }}/pulls/comments/${review_comment_id}" \ -f state="resolved"