Quantcast
Channel: Active questions tagged jq - Stack Overflow
Viewing all articles
Browse latest Browse all 543

jq string syntax issue

$
0
0

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.


Viewing all articles
Browse latest Browse all 543

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>