fix(github): report rate-limited or failed repo and event lookups - #452
NovaCode37 merged 3 commits into
Conversation
_get_repos and _emails_from_events swallowed every failure and returned an empty list, so a 403/429 on the follow-up calls produced status ok, repo_count 0 and no commit emails next to a profile with public repos. Both helpers now return (data, failure). A failed call is annotated as RATE_LIMITED with the GITHUB_TOKEN hint, or ERROR, the profile is kept, and repo_count / emails are left as None for the part not checked. Closes NovaCode37#445
|
Thanks for the first pull request here. CI needs a maintainer to approve the run before it starts, so it may sit for a bit before anything happens. |
|
Thanks, this is close. Splitting "none found" from "could not check" and keeping the profile on a partial failure is exactly right, and the tests cover it. One thing to change, and it is partly the issue's fault for saying to leave the email list as Keep Please add a test where the profile has an email and the events call returns 403, and check the email is still there. |
|
I opened a small follow-up PR against your branch: n-o-t-mugen#1. It preserves the profile email when the events request fails and exposes commit_emails_checked so an unchecked commit-email lookup is explicit. The GitHub Recon tests pass (9/9); the follow-up is ready to merge or cherry-pick into this branch. I also see your CI checks are green. |
|
@xiasan1992's follow-up (n-o-t-mugen#1) is exactly the change I asked for: the profile email stays and |
|
Pulled in @xiasan1992's two commits from n-o-t-mugen#1 (1c598b3, 0774096): the profile email is now kept when the events call fails, I didn't include the later 1c6bd62, since it changes behaviour beyond the review (defaults when the profile call fails). Full suite passes locally. |
|
@n-o-t-mugen Thanks for confirming and for incorporating |
_get_repos and _emails_from_events swallowed every failure and returned an empty list, so a 403/429 on the follow-up calls produced status ok, repo_count 0 and no commit emails next to a profile with public repos.
Both helpers now return (data, failure). A failed call is annotated as RATE_LIMITED with the GITHUB_TOKEN hint, or ERROR, the profile is kept, and repo_count / emails are left as None for the part not checked.
Closes #445