Skip to content

Commit

Permalink
fix(ci): replace gh with raw api call (#1119)
Browse files Browse the repository at this point in the history
  • Loading branch information
cwrau authored Aug 21, 2024
1 parent 2a4c1a1 commit 301a5da
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/scripts/create-values-diff.sh
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ function updateComment() {
body=$(generateComment "$chart")

if [[ "$dryRun" == false ]]; then
if existingCommentId="$(gh pr view "${issue}" --json comments | jq -er '.comments | map(select(.body | contains("<!--helm-diff-->")))[0].id')"; then
# cannot use `gh pr/issue view --json comments` as the returned id is incorrect
if existingCommentId="$(gh api "repos/${GITHUB_REPOSITORY}/issues/${issue}/comments" | jq -er 'map(select(.body | contains("<!--helm-diff-->")))[0].id')"; then
updateComment "$issue" "$existingCommentId" "$body"
else
createComment "$issue" "$body"
Expand Down

0 comments on commit 301a5da

Please sign in to comment.