Skip to content
Snippets Groups Projects
Commit df4141ec authored by Françoise Conil's avatar Françoise Conil
Browse files

Naive curl requests to retrieve all issues

I made a first request to get the number of pages then several curl
requests.

Unfortunately there were duplicates issues.

There may be some headers to catch and reuse but I do not know which
ones.

GitHub strongly insists on using their CLI (gh) to acccess the API.
parent fd1f3a10
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
# https://blog.exploratory.io/analyzing-issue-data-with-github-rest-api-63945017dedc
# (state = "all", per_page = 100, page = i
# -o pypi-issues_31-05-2024.${page}.json \
# Ou plus simplement dans la doc de l'API GitHub
# https://docs.github.com/en/rest/issues/issues?apiVersion=2022-11-28#list-repository-issues
seq -w 1 42 | while read page
do
curl -s -L -H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${MY_PYPI_ISSUES_TOKEN}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
-o pypi_issues.${page}.json \
"https://api.github.com/repos/pypi/support/issues?state=all&per_page=100&page=${page}"
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment