I am using this on my workflow:jq -c '[map(select(.state == "APPROVED")) | .[] .user.login]')
But I am getting this error:jq: error (at :4): Cannot index string with string "state"Error: Process completed with exit code 5.
How can I fix this
There is a curl command before that makes a GET request to the GitHub API endpoint that retrieves the reviews for the current pull request github.event.pr.number. It includes the necessary headers for authorization.The response is then piped to jq, a command-line JSON processor, which filters the reviews to only include those with the state "APPROVED". It then extracts the login (username) of each approving user and returns them as a JSON array.