File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments