We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a226f59 commit c43e41dCopy full SHA for c43e41d
src/github_analyser/licences.py
@@ -40,11 +40,12 @@ def get_licence(
40
41
response = request_github_graphql({"query": query})
42
# extract repo id from the first response
43
- repo_id = None
44
- if response:
45
- repo_id = response["data"]["repository"]["id"]
46
- repo_url = response["data"]["repository"]["url"]
+ if "errors" in response:
+ print(f"Failed to get licence data for {repo_name}: {response['errors']}")
+ return pd.Series()
47
+ repo_id = response["data"]["repository"]["id"]
48
+ repo_url = response["data"]["repository"]["url"]
49
licence_info = response["data"]["repository"]["licenseInfo"]
50
51
if licence_info is None:
0 commit comments