mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-05-28 04:40:20 +02:00
ci(blocked_pr): fix comment action
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
parent
79283fd744
commit
0474b03626
21
.github/actions/create-comment/action.yml
vendored
21
.github/actions/create-comment/action.yml
vendored
@ -51,6 +51,7 @@ runs:
|
||||
data=$(
|
||||
gh api graphql \
|
||||
--paginate \
|
||||
--slurp \
|
||||
-f owner="$owner" \
|
||||
-f repo="$repo" \
|
||||
-F issue="$ISSUE_NUMBER" \
|
||||
@ -90,16 +91,16 @@ runs:
|
||||
}
|
||||
}
|
||||
' \
|
||||
--jq '' | jq -c --arg comment_id "<!--(ID:$COMMENT_ID)-->" '
|
||||
.[0].data.repository.issueOrPullRequest.id as $id |
|
||||
[ .[].data.repository.issueOrPullRequest.comments.nodes[] ] as $data |
|
||||
[ $data.[] | select(.body | startswith($comment_id)) ] as $id_comments |
|
||||
if ($id_comments | length) > 0 then
|
||||
{ "issueId": $id, "commentId": $id_comments[0].id }
|
||||
else
|
||||
{ "issueId": $id, "commentId": "" }
|
||||
end
|
||||
'
|
||||
| jq -c --arg comment_id "<!--(ID:$COMMENT_ID)-->" '
|
||||
.[0].data.repository.issueOrPullRequest.id as $id |
|
||||
[ .[].data.repository.issueOrPullRequest.comments.nodes[] ] as $data |
|
||||
[ $data.[] | select(.body | startswith($comment_id)) ] as $id_comments |
|
||||
if ($id_comments | length) > 0 then
|
||||
{ "issueId": $id, "commentId": $id_comments[0].id }
|
||||
else
|
||||
{ "issueId": $id, "commentId": "" }
|
||||
end
|
||||
'
|
||||
)
|
||||
echo "ISSUE_NODE_ID=$(jq -r '.issueId' <<< "$data")" >> "$GITHUB_ENV"
|
||||
echo "COMMENT_NODE_ID=$(jq -r '.commentId' <<< "$data")" >> "$GITHUB_ENV"
|
||||
|
Loading…
x
Reference in New Issue
Block a user