Skip to content

Issue about the parameters 'per_page' and 'page' in the API #24371

Discussion options

You must be logged in to vote

Finally, I got the solution that using the double quotes (“”) to surround the API URL.
See the shell script: https://github.com/TestWorkflowsRML/RunAPI_Bash/blob/4ee8c4de131d9ddb31f0021bcba4b6d1a90c48a3/src/list-repo-workflow-runs.yml

The while loop can break as expected now. See the result here: https://github.com/TestWorkflowsRML/RunAPI_Bash/runs/1208532662?check_suite_focus=true#step:3:16

Thanks for the help from Ivan Zuzak.

I think the examples on the docs about the API should be changed to add the double quotes to surround the API URLs. Otherwise this may mislead users, just like the problem I was facing.
Current on the docs page:

curl \
  -H "Accept: application/vnd.github.v3+json" …

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
1 participant