This is the screenshot: https://cdn.pbrd.co/images/1IDll3HM.png
You could simplify this by simply using for issue in all_issues[:3] but then if you don't want all the issues, maybe you could store only the first 3 directly?
for issue in all_issues[:3]
Same here, you could simply use for row in pkg_details['rows']
for row in pkg_details['rows']
Which later allows you do to: issue_title=row['description'],
issue_title=row['description'],
Pull-Request has been rebased
I have made the changes. This is the screenshot: https://cdn.pbrd.co/images/247rnUWk.png
Do we need to keep in memory all the issues if we only display the first three?
Pull-Request has been updated
@pingou i have made changes to store only 3 issues in all_issues
nitpicking here but it's recommended to use [] as it's faster than list()
This is not required. :)
Can you arrange the imports separating the in-built modules, third-party modules and project imports
unused import :)
if you limit the number of issues below then:
all_issues
[:3]
Something that confuses me: here we get the last 3 bugs for all the packages, but we still only display 3 in the templates, so we may still end up with 20 packages * 3 bugs == 60 bugs in while we only show 3.
Maybe you could check before the length of allissues (whose name is no longer correct) to avoid querying for more bugs while you already have enough?
allissues
This will break the loop for row in pkg_details['rows']: but not the outer one (for package in data["point of contact"]:)
for row in pkg_details['rows']:
for package in data["point of contact"]:
But if we have more than 4 rows here, we will never trigger the check above :)
@threebean can you please review this PR?
Sorry, I hadn't commented because I thought @pingou and @sayanchowdhury were on it.
@ralph this is the latest screenshot: https://cdn.pbrd.co/images/2hHpLHrU.png
Looks great. Thanks so much @dhrish20!
Pull-Request has been merged by ralph