This fixes issue 3443, ' Watchers count on repo_info in the new UI is incorrect. ' It doesn't count groups, but that can easily be added if required.
why comment it out?
remove the print statement please :smile:
can we combine these ifs together?
if
we can directly use len(watch_users) here?
len(watch_users)
1 new commit added
various minor fixes for the review
Did you run tests on this?
rebased onto 1109343fb866274397dfc9d13218e6484dd53c62
I've added tests and fixed the logic to count users only once
if you use a set() instead of a list for watch_users you could remove all of these if item in list :)
set()
watch_users
if item in list
rebased onto ad378a18dedb6f3892b8d811cfe08803d84b6864
the latest version uses a set
This block seems to be testing against the test project in the middle of a block that is testing against a fork, maybe we should move this a little (or potentially to its own test)
rebased onto cf1a743a5334e156d9b28b5f455392d143af409c
:thumbsup:
Thanks for pointing me at this code segment. I intentionally put this here inside the testing of the forked project, but missed pointing the query at the fork. The latest push has this fixed.
test watchers of forked projects
rebased onto 5a34004a2b2b843835778861ca83a9d302d666f7
rebased onto 277ab2f11736fb362b3cd8fc34676cdd7d00a6f7
Thanks! :)
Pull-Request has been merged by pingou
This fixes issue 3443, ' Watchers count on repo_info in the new UI is incorrect. '
It doesn't count groups, but that can easily be added if required.