Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jq: error (at <stdin>:4): Cannot index string with string "state" #107

Open
moonwalkerpoday opened this issue Mar 30, 2024 · 1 comment
Open

Comments

@moonwalkerpoday
Copy link

Same issue as this one.
#63

Oddly enough, I was able to get the value without any problems when I verified jq in another workflow.

image

However, I get a jq error when I run label-when-approved-action@master.

image

It also works fine in some repositories.
Does this result depend on the repository settings?

@moonwalkerpoday
Copy link
Author

I was investigating the values parsed by jq, and upon finding a 403 error message, I resolved the issue by changing the settings 🎉

Run body=$(curl -sSL -H "Authorization: token ***" -H "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/<repo>/pulls/<pr number>/reviews?per_page=100")
{
  "message": "Resource not accessible by integration",
  "documentation_url": "https://docs.github.com/rest/pulls/reviews#list-reviews-for-a-pull-request",
  "status": "403"
}

Settings > Actions > General > Workflow permissions

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant