Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 218d49c

Browse files
committedOct 29, 2024··
Patching an error case that should be fixed in gh_api.py eventually. GitHub returning unexpected error responses when querying for certain releases while being unauthenticated. Thank you once again @fearcito.
1 parent 56e918b commit 218d49c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎src/gitxray/xrays/repository_xray.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,11 @@ def run(gx_context, gx_output):
240240
asset_uploaders = defaultdict(int)
241241

242242
for release in releases:
243+
# Particular case in which the GitHub API returns erratic data, mostly happening when not using an auth token
244+
# This needs to be fixed at a lower level in our gh_api code, patching here in the meantime.
245+
if not isinstance(release, dict):
246+
continue
247+
243248
if release.get('author') == None:
244249
author = "NO_USERNAME"
245250
else:

0 commit comments

Comments
 (0)
Please sign in to comment.