diff --git a/pylons_app/lib/utils.py b/pylons_app/lib/utils.py new file mode 100644 --- /dev/null +++ b/pylons_app/lib/utils.py @@ -0,0 +1,7 @@ + +def get_repo_slug(request): + path_info = request.environ.get('PATH_INFO') + repo_name = path_info.split('/')[-2] + action = path_info.split('/')[-1] + + return repo_name