Learn more about these different git repos.
Other Git URLs
No commits found
This one is a duplicate, so maybe we want to remove the dups :)
1 new commit added
3 new commits added
Is this line pep8 valid?
Also, is this a 403 or a 401?
When I see the amount of duplicated code I wonder if we shouldn't refactor a little bit (but maybe in another PR)
There are all together 3 projects, 2 for this user and the last one is?
We ran tests.create_projects(self.session) then create 2 projects?
tests.create_projects(self.session)
Maybe we should check that this is 0 before we add pingou to this project?
0
pingou
Duplicated paragraph?
pep8 :
pep8 :)
and here as well :)
3 projects are publicly viewed two are 'pingou' 's project which 'tests.create_projects(self.session)' creates and one is 'foo' 's public repository . Here 'foo' is viewing his repos so it has one public and one private repo.
One public project and the other private project with a different user.
I'm not sure 403 or 401 are the best ways to go here... you will likely not even want to leak the existence of private repos, so giving the same 404 as a project that just doesn't exist would likely be better.
Also, would it be an idea to instead do the permission check in pagure.lib.get_project? That way it automatically covers every place the repo is used.
And how many projects are created by tests.create_projects(self.session) ?
And you probably want the "if repo is None" above this..
:thumbsup: indeed
4 new commits added
is_repo_admin
get_project
You're passing the function as argument?
21 new commits added
2 new commits added
There are 4 projects total in the DB, here we see the 3 that are public and below we see 2, could we add a test to see either the remaining 2 and all the 4 at once?
80 chars long?
Technically we don't check if they are accessible but we check that they are not accessible :)
But I'm nit picking here :)
We didn't check that for a non-authenticated user
9 new commits added
The doc string here is misleading. It should better be something like Returns the repo object in cases when the repo is not private and if the logged in user is authorized to view the repo, else None
Returns the repo object in cases when the repo is not private and if the logged in user is authorized to view the repo, else None
This import is called here: https://pagure.io/fork/farhaan/pagure/blob/private-repo/f/pagure/ui/fork.py#_999
Thanks for pointing that out :smile:
Extra space here and here
while listing "All projects" in the index page, should we include or not include, the count of private repos while telling the total number of projects?
We should't include count of private repos!
Btw, to help being compatible w/ py3, could you use output.get_data(as_text=True) everywhere you use output.data, just doing a global search and replace should do :)
output.get_data(as_text=True)
output.data
37 new commits added
Alright, looks good to me, let's merge :)
Pull-Request has been merged by pingou