File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,11 +53,11 @@ jobs:
5353 # - comment belongs to the PR with number $PR_NUMBER
5454 # - comment starts with the expected prefix ("QHelp previews")
5555 # - comment author is github-actions[bot]
56- FILTER=" select(.issue_url | test(\"${GITHUB_REPOSITORY} /issues/${PR_NUMBER}$\")) \
57- | select(.body | test(\"^${COMMENT_PREFIX}\")) \
58- | select(.user.login == \"${COMMENT_AUTHOR}\") \
59- | .id"
60- COMMENT_ID=$(gh api "repos/${GITHUB_REPOSITORY}/issues/comments/${RAW_COMMENT_ID }" | jq "${FILTER}")
56+ FILTER=' select(.issue_url | endswith($repo+" /issues/"+$pr))
57+ | select(.body | startswith($prefix))
58+ | select(.user.login == $author)
59+ | .id'
60+ COMMENT_ID=$(gh api "repos/${GITHUB_REPOSITORY}/issues/comments/${COMMENT_ID }" | jq --arg repo "${GITHUB_REPOSITORY}" --arg pr "${PR_NUMBER}" --arg prefix "${COMMENT_PREFIX}" --arg author "${COMMENT_AUTHOR}" "${FILTER}")
6161 if [ $COMMENT_ID ]
6262 then
6363 # Update existing comment
You can’t perform that action at this time.
0 commit comments