py-cov-action / python-coverage-comment-action

Publish coverage report as PR comment, and create a coverage badge & dashboard to display on the Readme for Python projects, all inside GitHub without third party servers
https://github.com/marketplace/actions/python-coverage-comment
MIT License
84 stars 32 forks source link

add pagination for artifacts retrieval #453

Closed fabiogallotti closed 3 months ago

fabiogallotti commented 3 months ago

Hello @ewjoachim,

following the discussion we had some weeks ago with @AlessandroMiola here, I'm proposing you a small fix in order to handle the pagination for artifacts.

I'm looping page by page and, if the result of page n+1 is empty, I'm breaking out of the loop. The rationale behind is that If we ask a page without artifact we get an empty response (see for example https://api.github.com/repos/pydantic/pydantic/actions/runs/9815232181/artifacts?page=3)

To be honest, I'm not very happy with this solution, probably the best one would be to migrate from the https://github.com/michaelliao/githubpy client (that I noticed it's not maintained anymore) to something like https://github.com/PyGithub/PyGithub, but the changes would be substantial I guess.

I also took the occasion to introduce a Makefile to ease local development, let me know what you think about it ;)

Closes #438

github-actions[bot] commented 3 months ago

End-to-end public repo

Admin commands cheatsheet:

github-actions[bot] commented 3 months ago

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  coverage_comment
  github.py
Project Total  

This report was generated by python-coverage-comment-action