#1282 Move from fake namespace to real ones
Merged by pingou. Opened by pingou.
namespace  into  master

Download 1282.patch
no initial comment

6 new commits added

  • Adjust the regex validating project names
  • Add unit-tests for pagure.lib.git.get_namespace
  • Expand unit-tests for pagure.lib.git.get_username
  • Let's get the namespace by rsplit rather than split
  • Adjust pagure-ci and pagure-webhook to account for namespaces
  • Rework the get_repo_namespace method in pagure.lib.git

1 new commit added

  • Fix typo in the edit_tag.html template

related discussion --> https://pagure.io/pagure/issue/1231

this, this, this, this, this and this should be commented, no ?

The activity endpoint is still very much WIP and not advertised, so I'm inclined to leave it as such.

The EventListener it still there because it's still most helpful when trying to debug SSE errors.

The two on edit_file.html could be dropped sure, but do we want to add this change to this PR or do it in another one since it's not quite related :)

namespace=repo.namespace here and the next one.

btw, where is this render coming from ?

missed here and here and here?

btw, where is this render coming from ?

pagure.ui.filter :)

Good catch for the links, I'll adjust them

probably here, here, here, here, here, here, here, here, here, here, here also

a mistake here

1, 2, three

we shouldn't need this or this, we do have repo in the view_args

I hope @pingou has covered all the files. Besides these, i haven't looked at the tests, will do tomorrow morning.

4 new commits added

  • Add missing namespaces arguments in the template/urls, thanks @vivekanand1101
  • Adjust the is_watching method for namespaces, thanks @vivekanand1101
  • Add missing namespace arguments and fix typos pointed out by @vivekanand1101
  • Drop the two console.log() call in edit_file.html

rebased

:thumbsup:

I don't like this one, as this introduces a hidden value that will break (not doe what someone expects).

How about just namesmace == '' if you really need something?

Why don't you reuse allowed_prefix here for consistency?

Why is namespace here the earlier argument, while everywhere else it's RUN (Repo, User, Namespace)?

Why do you use username, repo, namespace order here, while the rest uses RUN?

The problem is that is no namespace is provided, for some reason I end up with a 'None' string, so this is the only way I found to actually set namespace to None which is what we want.

Instead of?

Perhaps it's an idea to instead just add a property "repo.fullname", which includes the namespace, rather than reproduce this every time?

They are all keyword arguments, so the order doesn't really mater...

Even more inconsistent.. Now you've got RUN, URN, and NRU :sob:

And now NUR too...

Fullname includes the prefix forks/ for forks, I'm not sure it's ideal

Rather than passing it here explicitly.
So my idea was to just make this init use the allowed_prefixes code to determine the list itself rather than having it be passed in.

Well it's not just what is in the configuration file and I think I'd rather keep the logic out of the forms

1 new commit added

  • Adjust the order of the arguments in the links and some functions

Ack. I still find the wtforms thing strange, but if you say that it's okay...
:thumbsup:

2 new commits added

  • Fix the ProjectForm to be allowed to return None, not just unicode objects
  • Specify the allowed namespaces when creating a project via the API

That looks a lot nicer. :thumbsup: :)

Thanks, let's merge then :)

Thanks for the reviews @puiterwijk and @vivekanand1101 I know this wasn't a small one!

Pull-Request has been merged by pingou

Metadata