Skip to content

Commit

Permalink
Separate comment steps
Browse files Browse the repository at this point in the history
  • Loading branch information
kodster28 committed Dec 12, 2023
1 parent df1a5c9 commit 18ef745
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/automated-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ jobs:
"https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/comments" | \
jq '.[] | select(.user.id == 41898282) | select(.body | contains("TEST")) | .id')
comment_body=$(jq -n --arg body "TEST\n<!-- MODIFIED_CONTENT_LINKING_COMMENT -->" '{body: $body}')
comment_body_unformatted = "TEST\n\n<!-- MODIFIED_CONTENT_LINKING_COMMENT -->"
comment_body=$(jq -n --arg body "$comment_body_unformatted" '{body: $body}')
# If a comment exists, update it. Otherwise, post a new comment.
if [ ! -z "$existing_comment_id" ]; then
curl -s -H "Authorization: Bearer $GITHUB_TOKEN" \
Expand Down

0 comments on commit 18ef745

Please sign in to comment.