From 20ccbb35c997a9fb1187396f961d10895e8bc4f4 Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Mar 20 2014 08:07:42 +0000 Subject: Add possibility to fork a fork because sometime you just want to :) --- diff --git a/progit/fork.py b/progit/fork.py index c63572c..0e15e03 100644 --- a/progit/fork.py +++ b/progit/fork.py @@ -26,10 +26,11 @@ from progit import APP, SESSION, LOG ### Application @APP.route('/fork/') -def fork_project(repo): +@APP.route('/fork//') +def fork_project(repo, username=None): """ Fork the project specified into the user's namespace """ - repo = progit.lib.get_project(SESSION, repo) + repo = progit.lib.get_project(SESSION, repo, user=username) if repo is None: flask.abort(404) diff --git a/progit/templates/repo_master.html b/progit/templates/repo_master.html index 8ced7ac..7aacfc6 100644 --- a/progit/templates/repo_master.html +++ b/progit/templates/repo_master.html @@ -61,7 +61,13 @@