Skip to content

Commit

Permalink
accurate count for user contributions filler
Browse files Browse the repository at this point in the history
  • Loading branch information
wschuell committed Jun 19, 2024
1 parent 6c16cee commit 053cb5a
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions repodepo/fillers/github_gql.py
Original file line number Diff line number Diff line change
Expand Up @@ -7946,12 +7946,10 @@ def get_nb_items(self, query_result):
for qname, q in query_result.items():
if qname == "rateLimit" or q is None:
continue
for e in q["contributionsCollection"][
f"{self.contrib_type}ContributionsByRepository"
]:
key = f"total{f'{self.contrib_type[0].upper()}{self.contrib_type[1:]}'}Contributions"
if key in e.keys():
ans += e[key]
e = q["contributionsCollection"]
key = f"total{self.contrib_type[0].upper()}{self.contrib_type[1:]}Contributions"
if key in e.keys():
ans += e[key]
return ans

def parse_query_result(self, query_result, identity_id, identity_type_id, **kwargs):
Expand Down

0 comments on commit 053cb5a

Please sign in to comment.