mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-05-29 05:10: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=$(
|
data=$(
|
||||||
gh api graphql \
|
gh api graphql \
|
||||||
--paginate \
|
--paginate \
|
||||||
|
--slurp \
|
||||||
-f owner="$owner" \
|
-f owner="$owner" \
|
||||||
-f repo="$repo" \
|
-f repo="$repo" \
|
||||||
-F issue="$ISSUE_NUMBER" \
|
-F issue="$ISSUE_NUMBER" \
|
||||||
@ -90,16 +91,16 @@ runs:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
' \
|
' \
|
||||||
--jq '' | jq -c --arg comment_id "<!--(ID:$COMMENT_ID)-->" '
|
| jq -c --arg comment_id "<!--(ID:$COMMENT_ID)-->" '
|
||||||
.[0].data.repository.issueOrPullRequest.id as $id |
|
.[0].data.repository.issueOrPullRequest.id as $id |
|
||||||
[ .[].data.repository.issueOrPullRequest.comments.nodes[] ] as $data |
|
[ .[].data.repository.issueOrPullRequest.comments.nodes[] ] as $data |
|
||||||
[ $data.[] | select(.body | startswith($comment_id)) ] as $id_comments |
|
[ $data.[] | select(.body | startswith($comment_id)) ] as $id_comments |
|
||||||
if ($id_comments | length) > 0 then
|
if ($id_comments | length) > 0 then
|
||||||
{ "issueId": $id, "commentId": $id_comments[0].id }
|
{ "issueId": $id, "commentId": $id_comments[0].id }
|
||||||
else
|
else
|
||||||
{ "issueId": $id, "commentId": "" }
|
{ "issueId": $id, "commentId": "" }
|
||||||
end
|
end
|
||||||
'
|
'
|
||||||
)
|
)
|
||||||
echo "ISSUE_NODE_ID=$(jq -r '.issueId' <<< "$data")" >> "$GITHUB_ENV"
|
echo "ISSUE_NODE_ID=$(jq -r '.issueId' <<< "$data")" >> "$GITHUB_ENV"
|
||||||
echo "COMMENT_NODE_ID=$(jq -r '.commentId' <<< "$data")" >> "$GITHUB_ENV"
|
echo "COMMENT_NODE_ID=$(jq -r '.commentId' <<< "$data")" >> "$GITHUB_ENV"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user