I’ve been having a problem in getting all contributor commit activity statistics from the GitHub REST API. In a workflow, I run this following script:
run: |
curl --request GET \
--url https://api.github.com/repos/${{ github.repository }}/stats/contributors \
--header 'authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' \
--header 'content-type: application/json' > contribute.json
No run errors here, but when I write this to a JSON file, it only contains an empty JSON array:
{
}
Does anyone know the problem of why it is outputting an empty JSON file? This is a private repository if it helps with finding the problem. Thanks in advance!