github_repo_pull_request_count only returns result from one page
jessie-ye-hs opened this issue · comments
We have a repository that returns more than 1 page of result for the /pull endpoint. The data that's gathered for scraping is much smaller, and equal to the number of PRs returned by the last page of results. This line seem to be the culprit. Same thing for getReleases. Before I submit a PR and make it store results from all pages, was there a reason it was done this way?
I ran into this also, not sure if you are on github enterprise. For that setup, with a custom API_URL, there were a couple places where the code relies on specific placement of &
or ?
in a URL to determine how many pages it needs to retrieve.
https://github.com/infinityworks/github-exporter/blob/master/exporter/http.go#L75
I haven't worked with go much but with these mods:
https://gist.github.com/nhardt/a41fca5b4bdec575e6c98e2c10eaa573
I was able to get to this line:
github-exporter_1 | INFO[0091] All Metrics successfully collected
I haven't yet been able to pull that into grafana yet but the /metrics page has a bunch of stuff in it. Hope that helps.