#1056 Fix test case
Merged by pingou. Opened by farhaan.
farhaan/pagure private-repo  into  private_repo

Download 1056.patch
no initial comment

I would like to see an actual explanation for the commit https://pagure.io/fork/farhaan/pagure/c/fde8025a3f93c8489cececb1f69230ca2a47322c in the commit message.

What does it fix? Why? How? Why was this needed?

The amount of changes made here make me a little chily for such a large change to a function that's quite important

Same for the commit https://pagure.io/fork/farhaan/pagure/c/dc3f26fe501b25d0e905bf6a846fde6ce4364321 the commit message does not explain why the change to pagure/lib/__init__.py

3 new commits added

  • Fix 'Test delete_repo and index_auth()'
  • Fix search_project
  • Fix typo

2 new commits added

  • Fix test delete_repo endpoint
  • Fix typo

This is for search_project. I didn't understand the code proposed by @farhaan. My gut feeling says, something similar to this should do the task. This is totally NOT tested and pls don't mind the indentation.

https://paste.fedoraproject.org/378581/35465146/

What do you say @farhaan, @pingou ?

Hey @vivekanand1101 thanks for reviewing the code , see the whole concept is not to change the search_project functionality much since it is one of the core functions.
There are few pointer that @pingou gave and I consider :

  1. The design need to similar like private issues cf search_issues in lib/__init__.py
  2. private is a boolean in database while here it is following an approach where when authenticated private is assigned username from global variable and False when not authenticated

Hope I explained it well and hope you got my approach rest it is upto @pingou and thanks a lot again.

What about doing if not private?

While at it, let's invert the check: elif private == username since in this sequence we're checking private, not username :)

Couple of the comments but this looks good yeah :)

1 new commit added

  • Fix conditions

1 new commit added

  • Fix trailing space

Looks good, thanks :)

Pull-Request has been merged by pingou

Metadata