Skip to content

Commit 942388e

Browse files
committed
Pipe to jq --arg instead of gh api --jq
1 parent eba303d commit 942388e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/qhelp-pr-preview.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
run: |
9090
# Find the latest comment starting with "QHelp previews"
9191
COMMENT_PREFIX="QHelp previews"
92-
gh api "repos/${GITHUB_REPOSITORY}/issues/${PR_NUMBER}/comments" --paginate --jq "[.[] | select(.body|startswith(\"${COMMENT_PREFIX}\")) | .id] | max" > comment_id.txt
92+
gh api "repos/${GITHUB_REPOSITORY}/issues/${PR_NUMBER}/comments" --paginate | jq --arg prefix "${COMMENT_PREFIX}" '[.[] | select(.body|startswith($prefix)) | .id] | max' > comment_id.txt
9393
env:
9494
GITHUB_TOKEN: ${{ github.token }}
9595
PR_NUMBER: ${{ github.event.number }}

0 commit comments

Comments
 (0)