Skip to content

Commit e943add

Browse files
committed
add comments
1 parent 7f9d802 commit e943add

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

ci/scripts/changed_crates.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,15 @@ cmd_comment() {
9292
comment_id=$(gh api "repos/${repo}/issues/${pr_number}/comments" \
9393
--jq ".[] | select(.body | contains(\"${MARKER}\")) | .id" | head -1)
9494

95+
echo "existing breaking change comment id $comment_id"
96+
9597
if [ "$check_result" = "success" ]; then
9698
# Delete the comment if one exists
9799
if [ -n "$comment_id" ]; then
100+
echo "result is success, so deleting breaking change comment"
98101
gh api "repos/${repo}/issues/comments/${comment_id}" --method DELETE
102+
else
103+
echo "result is success and no previous comment to delete"
99104
fi
100105
else
101106
local body="${MARKER}
@@ -110,9 +115,11 @@ ${logs}
110115
\`\`\`"
111116

112117
if [ -n "$comment_id" ]; then
118+
echo "comment already exists, updating content"
113119
gh api "repos/${repo}/issues/comments/${comment_id}" \
114120
--method PATCH --field body="$body"
115121
else
122+
echo "no comment with breaking changes, creating a new one"
116123
gh api "repos/${repo}/issues/${pr_number}/comments" \
117124
--method POST --field body="$body"
118125
fi

0 commit comments

Comments
 (0)