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

github_repo_pull_request_count only returns result from one page #51

Open
jessie-ye-hs opened this issue Jul 8, 2020 · 1 comment
Open

Comments

@jessie-ye-hs
Copy link

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?

@nhardt
Copy link

nhardt commented Aug 6, 2020

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.

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

2 participants