#36 Check if fork exists before cloning
Merged by lsedlar. Opened by lsedlar.
lsedlar/pag namespace-repo-url  into  develop

Download 36.patch

Current heuristic for determining forks is checking if there is a slash in the repo name. That however does not work in the face of namespaces.

This patch adds an option to repo_url function to force the code to treat the name as is and not as a fork. The caller will have to decide what to do.

In clone command we can query Pagure API to figure out if we are cloning a fork or repo in namespace. This incurs a small slowdown, but makes it work for both cases.

Fixes: https://pagure.io/pag/issue/27

I'm gonna roll with this for now. We can always change the UI to have some explicit way of specifying forks.

Pull-Request has been merged by lsedlar

Metadata